Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail :...

33
nter-VLAN Routing Advanced Computer Networks Advanced Computer Networks Lecturer: Lecturer: Eng . Ahmed Hemaid Eng . Ahmed Hemaid E-mail : E-mail : [email protected] [email protected] Office: Office: I 114 I 114 1

Transcript of Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail :...

Page 1: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Inter-VLAN Routing

Advanced Computer NetworksAdvanced Computer Networks

Lecturer: Lecturer: Eng . Ahmed HemaidEng . Ahmed Hemaid

E-mail :E-mail : [email protected]@iugaza.edu.ps

Office:Office: I 114I 114

11

Page 2: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Inter-VLAN Routing

Introducing Inter-VLAN RoutingIntroducing Inter-VLAN Routing

22

Page 3: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Introducing Inter-VLAN Routing

What is Inter-VLAN Routing?Each VLAN is a unique broadcast domain.

○ Computers on separate VLANs are, by default, not able to communicate.

Each VLAN is a unique IP subnetwork.

To allow VLANs to communicate, we need a router to communicate among separate broadcast domains and unique IP subnetworks.

Inter-VLAN routing, then, is a process of forwarding traffic from one VLAN to another VLAN using a router.

33

Page 4: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Introducing Inter-VLAN Routing

Methods:Traditional Inter-VLAN Routing.Router-on-a-stick Inter-VLAN Routing.Switch Based Inter-VLAN Routing.

44

Page 5: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Introducing Inter-VLAN Routing

Traditional Inter-VLAN Routing:One router interface per VLAN.

VLAN VLAN TaggedTagged

Internally Routed to Internally Routed to the proper subnet.the proper subnet.

TagTagremovedremoved

55

Page 6: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Introducing Inter-VLAN Routing Router-on-a-stick Inter-VLAN Routing:

One router interface for all VLANs.

VLAN VLAN TaggedTagged

Internally Routed to Internally Routed to the proper subnet.the proper subnet.

TagTagremovedremoved

66

Page 7: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Introducing Inter-VLAN Routing

Layer 3 Switch Inter-VLAN Routing: Uses Switch Virtual Interfaces (SVI) to retag

the frame.

VLAN VLAN TaggedTagged

(10)(10)

TagTagremovedremoved

77

Page 8: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces Traditional Inter-VLAN Routing:Traditional routing requires routers to have multiple

physical interfaces to facilitate inter-VLAN routing. Each interface is also configured with an IP address

for the subnet associated with the particular VLAN that it is connected to.

In this configuration, network devices can use the router as a gateway to access the devices connected to the other VLANs.

88

Page 9: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Traditional Inter-VLAN RoutingTraditional Inter-VLAN Routing

Interfaces and Subinterfaces

TaggedTaggedVLAN 10VLAN 10TaggedTagged

VLAN 10VLAN 10TagTag

RemovedRemoved

Router Router RespondsResponds

Routing table:Routing table:172.17.10.0 – F0/0172.17.10.0 – F0/0172.17.30.0 – F0/1172.17.30.0 – F0/1

Routing table:Routing table:172.17.10.0 – F0/0172.17.10.0 – F0/0172.17.30.0 – F0/1172.17.30.0 – F0/1

Router tagsRouter tagsthe framethe frame

for VLAN 30for VLAN 30And switches itAnd switches itto Port F0/1. to Port F0/1.

99

Page 10: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Traditional Inter-VLAN RoutingTraditional Inter-VLAN Routing

Interfaces and Subinterfaces

1010

Page 11: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Traditional Inter-VLAN Routing:Traditional inter-VLAN

routing using physicalinterfaces does have alimitation.

As the number of VLANsincreases on a network, thephysical approach of having one router interface per VLAN quickly becomes hindered by the physical hardware limitations of a router.

Routers have a limited number of physical interfaces that they can use to connect to different VLANs.

It is very expensive to add an Ethernet Interface.

Interfaces and Subinterfaces

1111

Page 12: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces Router-on-a-stick Inter-VLAN Routing:Subinterfaces:

○ Overcomes the hardware limitation of a router. ○ Subinterfaces are software-based virtual interfaces that

are assigned to physical interfaces. ○ Each subinterface is configured with its own IP address,

subnet mask, and unique VLAN assignment.○ Connected to a switch trunk link. ○ Functionally the same as using the traditional routing

model.

1212

Page 13: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces

Router-on-a-stick Inter-VLAN RoutingRouter-on-a-stick Inter-VLAN Routing

TaggedTaggedVLAN 10VLAN 10

TagTagRemovedRemoved

Routing table:Routing table:172.17.10.0 – F0/0.10172.17.10.0 – F0/0.10172.17.30.0 – F0/0.30172.17.30.0 – F0/0.30

TaggedTaggedVLAN 30VLAN 30TaggedTagged

VLAN 30VLAN 30

TagTagRemovedRemoved

TagTagRemovedRemovedTaggedTagged

VLAN 30VLAN 30TaggedTagged

VLAN 30VLAN 30TagTag

RemovedRemovedTagTag

RemovedRemoved

1313

Page 14: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces Router-on-a-stick Inter-VLAN Routing:Configuring Subinterfaces:

○Similar to configuring physical interfaces.Create the subinterface.Assign it to a VLAN.Assign an IP Address.Enable the interface.

1414

Page 15: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces Router-on-a-stick Inter-VLAN Routing:Create the subinterface:

○ The syntax for the subinterface is always the physical interface, followed by a period and a subinterface number.

○ The subinterface number is configurable, but it is typically associated to reflect the VLAN number.

R1(config)#interface [interface].nn

1515

Page 16: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces Router-on-a-stick Inter-VLAN Routing:Assign it to a VLAN:

○ Before assigning an IP Address, the interface must to be configured to operate on a specific VLAN using the proper encapsulation.

R1(config-subif)#encapsulation dot1q vlan-id

1616

Page 17: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces Router-on-a-stick Inter-VLAN Routing:Assign an IP Address:

○ The IP Address assigned here will become the default gateway for that VLAN.

R1(config-subif)#ip address [address] [mask]

1717

Page 18: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces Router-on-a-stick Inter-VLAN Routing:Enable the interface:

○ Subinterfaces are not enabled individually.○ When the physical interface is enabled, all associated

subinterfaces are enabled.

R1(config-if)#no shutdown

1818

Page 19: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces

Router-on-a-stick Inter-VLAN Routing:Configuring Subinterfaces:

VLAN 10VLAN 10VLAN 10VLAN 10VLAN 10VLAN 10VLAN 10VLAN 10

VLAN 30VLAN 30VLAN 30VLAN 30

VLAN 10VLAN 10VLAN 10VLAN 10

VLAN 30VLAN 30VLAN 30VLAN 30

Enable InterfacesEnable InterfacesEnable InterfacesEnable Interfaces

1919

Page 20: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces

Router-on-a-stick Inter-VLAN Routing:Configuring Subinterfaces:

Planning!Planning!Planning!Planning!

2020

Page 21: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Interfaces and Subinterfaces Router Interface and Subinterface Comparison:

2121

Page 22: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Inter-VLAN RoutingConfiguring Inter-Configuring Inter-

VLAN RoutingVLAN Routing(Putting It All Together)(Putting It All Together)

2222

Page 23: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

Traditional Inter-VLAN Routing:

2323

Page 24: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

Traditional Inter-VLAN Routing:

2424

Page 25: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

Traditional Inter-VLAN Routing:

2525

Page 26: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

Router-on-a-stick Inter-VLAN Routing:

VLANsVLANsVLANsVLANs

TrunkTrunkTrunkTrunk

InterfacesInterfacesInterfacesInterfaces

VLANsVLANsVLANsVLANs

Trunk in Trunk in Native VLANNative VLAN

Trunk in Trunk in Native VLANNative VLAN

2626

Page 27: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

Router-on-a-stick Inter-VLAN Routing:

VLAN 10VLAN 10VLAN 10VLAN 10

VLAN 30VLAN 30VLAN 30VLAN 30

Enable All Enable All SubinterfacesSubinterfaces

Enable All Enable All SubinterfacesSubinterfaces

2727

Page 28: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Inter-VLAN RoutingTroubleshooting Inter-VLAN Troubleshooting Inter-VLAN

RoutingRouting

2828

Page 29: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

Switch Configuration Issues:VLAN 30 is working but VLAN 10 VLAN 30 is working but VLAN 10

cannot communicate with the cannot communicate with the router or VLAN 30.router or VLAN 30.

VLAN 30 is working but VLAN 10 VLAN 30 is working but VLAN 10 cannot communicate with the cannot communicate with the

router or VLAN 30.router or VLAN 30.

Interface F0/4 is still in Interface F0/4 is still in the default VLAN.the default VLAN.

Interface F0/4 is still in Interface F0/4 is still in the default VLAN.the default VLAN.

switchport access vlan 10switchport access vlan 10switchport access vlan 10switchport access vlan 10

2929

Page 30: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

Switch Configuration Issues:Each of the configured Each of the configured

subinterfaces is unable to subinterfaces is unable to send or receive VLAN traffic.send or receive VLAN traffic.

Each of the configured Each of the configured subinterfaces is unable to subinterfaces is unable to

send or receive VLAN traffic.send or receive VLAN traffic.

Interface F0/5 is still in Interface F0/5 is still in the default VLAN.the default VLAN.

Interface F0/5 is still in Interface F0/5 is still in the default VLAN.the default VLAN.

switchport mode trunkswitchport mode trunkswitchport mode trunkswitchport mode trunk

3030

Page 31: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

Router Configuration Issues:PC1 cannot communicate with the PC1 cannot communicate with the

router interface and the router router interface and the router cannot route to VLAN 30.cannot route to VLAN 30.

PC1 cannot communicate with the PC1 cannot communicate with the router interface and the router router interface and the router

cannot route to VLAN 30.cannot route to VLAN 30.

Switch port F0/4 is Switch port F0/4 is for VLAN 10.for VLAN 10.

Switch port F0/4 is Switch port F0/4 is for VLAN 10.for VLAN 10.

Move the cable from F0/9 to F0/4.Move the cable from F0/9 to F0/4.Move the cable from F0/9 to F0/4.Move the cable from F0/9 to F0/4.

One of the most common One of the most common mistakes in Inter-VLAN routing.mistakes in Inter-VLAN routing.

One of the most common One of the most common mistakes in Inter-VLAN routing.mistakes in Inter-VLAN routing.

Move the cable from F0/9 to F0/4.Move the cable from F0/9 to F0/4.Move the cable from F0/9 to F0/4.Move the cable from F0/9 to F0/4.

3131

Page 32: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

Router Configuration Issues:PC1 cannot communicate with the PC1 cannot communicate with the

router interface and the router router interface and the router cannot route to VLAN 30.cannot route to VLAN 30.

PC1 cannot communicate with the PC1 cannot communicate with the router interface and the router router interface and the router

cannot route to VLAN 30.cannot route to VLAN 30.

3232

Page 33: Inter-VLAN Routing Advanced Computer Networks Lecturer: Eng. Ahmed Hemaid E-mail : ahemaid@iugaza.edu.ps Office: I 114 1.

Chapter 6

Configuring Inter-VLAN Routing

IP Addressing Issues:

Incorrect IP address for Incorrect IP address for subnet 172.16.10.0/24.subnet 172.16.10.0/24.

Incorrect IP address for Incorrect IP address for subnet 172.16.10.0/24.subnet 172.16.10.0/24.Incorrect IP address for Incorrect IP address for subnet 172.16.10.0/24.subnet 172.16.10.0/24.Incorrect subnet mask for Incorrect subnet mask for subnet 172.16.10.0/24.subnet 172.16.10.0/24.

PC1 cannot communicate.PC1 cannot communicate.PC1 cannot communicate.PC1 cannot communicate.

3333