Inter vlan Routing
Last updated
Last updated
Router(config)#hostname R1
R1(config)#no ip domain-lookup
R1(config)#line con 0
R1(config-line)#exec-timeout 0 0 //Console bağlantısı asla time out olmayacak
R1(config-line)#logging synchronous //Turns on synchronous logging.
Information items sent to console will not interrupt the command you are typing.
The command will be moved to a new line
R1(config)#banner motd # R1
Enter TEXT message. End with the character '#'.
Inter Vlan Routing Lab icin #
R1(config)#exit
Router(config)#hostname R3
R3(config)#banner motd ^
Enter TEXT message. End with the character '^'.
R3 router
Inter vlan routing icin
^
R3(config)#line con 0
R3(config-line)#exec-timeout 0 0
R3(config-line)#logging synchronous
R3(config-line)#exit
R3(config)#no ip domain lookup
Switch#conf t
Switch(config)#hostname D1
D1(config)#no ip domain-lookup
D1(config)#line con 0
D1(config-line)#exec-timeout 0 0
D1(config-line)#logging synchronous
D1(config-line)#exit
D1(config)#banner motd ^
Enter TEXT message. End with the character '^'.
D1 Switch
Inter vlan routing icin^
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname D2
D2(config)#line con 0
D2(config-line)#exec-time
D2(config-line)#exec-timeout 0 0
D2(config-line)#loggi
D2(config-line)#logging syn
D2(config-line)#logging synchronous
D2(config-line)#exit
D2(config)#no ip domain-lookup
D2(config)#banner motd ^
Enter TEXT message. End with the character '^'.
D2 Switch
Inter vlan routing icin^
D1 Üzerinde Inter-Vlan Routing
D1(config)#ip routing
D1(config)#ipv6 unicast-routing
D1(config)#vlan 50
D1(config-vlan)#name Group50
D1(config-vlan)#exit
D1(config)#vlan 60
D1(config-vlan)#name Group60
D1(config-vlan)#exit
İnterface altına Vlanları tanımla
D1(config)#int gig1/0/2
D1(config-if)#switchport mode access
D1(config-if)#switchport access vlan 50
D1(config-if)#no shutdown
D1(config-if)#int gig1/0/3
D1(config-if)#switchport mode access
D1(config-if)#switchport access vlan 60
D1(config-if)#no shutdown
Switched Virtual Interface(SVI) vlan 50 ve vlan 60 destekleyecek.
D1(config)#interface vlan 50
D1(config-if)#
%LINK-5-CHANGED: Interface Vlan50, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan50, changed state to up
D1(config-if)#ip add 10.2.50.1 255.255.255.0
D1(config-if)#ipv6 add fe80::d1:2 link-local
D1(config-if)#ipv6 add 2001:db8:acad:1050::d1/64
D1(config-if)#no shut
D1(config-if)#int vlan 60
D1(config-if)#
%LINK-5-CHANGED: Interface Vlan60, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan60, changed state to up
D1(config-if)#ip add 10.2.60.1 255.255.255.0
D1(config-if)#ipv6 add fe80::d1:3 link-local
D1(config-if)#ipv6 add 2001:db8:acad:1060::d1/64
D1(config-if)#no shut
D1(config-if)#exit
D1(config)#interface gig1/0/1
D1(config-if)#no switchport
D1(config-if)#ip add 10.1.13.13 255.255.255.0
D1(config-if)#ipv6 add fe80::d1:1 link-local
D1(config-if)#ipv6 add 2001:db8:acad:10d1::d1/64
D1(config-if)#no shutdown
Verify that interface G1/0/11 is no longer associated with the VLAN database by
issuing the command
show vlan brief | i g1/0/11. There should be no output.
D1#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gig1/0/4, Gig1/0/5, Gig1/0/6, Gig1/0/7
Gig1/0/8, Gig1/0/9, Gig1/0/10, Gig1/0/11
Gig1/0/12, Gig1/0/13, Gig1/0/14, Gig1/0/15
Gig1/0/16, Gig1/0/17, Gig1/0/18, Gig1/0/19
Gig1/0/20, Gig1/0/21, Gig1/0/22, Gig1/0/23
Gig1/0/24, Gig1/1/1, Gig1/1/2, Gig1/1/3
Gig1/1/4
50 Group50 active Gig1/0/2
60 Group60 active Gig1/0/3
D1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
D1(config)#ip route 0.0.0.0 0.0.0.0 10.1.13.1
D1(config)#ipv6 route ::/0 2001:db8:acad:10d1::1
R1 router üzerinde
R1(config)#ipv6 unicast-routing
R1(config)#int gig0/0/0
R1(config-if)#ip add 10.1.13.1 255.255.255.0
R1(config-if)#ipv6 add fe80::1:1 link-local
R1(config-if)#ipv6 add 2001:db8:acad:10d1::1/64
R1(config-if)#no shut
R1(config-if)#int s0/1/0
R1(config-if)#ip add 10.1.3.1 255.255.255.0
R1(config-if)#ipv6 add fe80::1:2 link-local
R1(config-if)#ipv6 add 2001:db8:acad:1013::1/64
R1(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/1/0, changed state to down
R1(config-if)#exit
R1(config)#ip route 10.2.0.0 255.255.0.0 10.1.13.13
R1(config)#ipv6 route 2001:db8:acad:1050::/64 2001:db8:acad:10d1::d1
R1(config)#ipv6 route 2001:db8:acad:1060::/64 2001:db8:acad:10d1::d1
R1(config)#ip route 0.0.0.0 0.0.0.0 10.1.3.3
R1(config)#ipv6 route ::/0 2001:db8:acad:1013::3
D2(config)#vlan 75
D2(config-vlan)#name Group75
D2(config-vlan)#vlan 85
D2(config-vlan)#name Group85
D2(config-vlan)#exit
D2(config)#vlan 999
D2(config-vlan)#name NativeVLAN
D2(config-vlan)#exit
D2(config)#interface vlan 75
D2(config-if)#
%LINK-5-CHANGED: Interface Vlan75, changed state to up
D2(config-if)#ip add 10.3.75.14 255.255.255.0
D2(config-if)#ipv6 add fe80::d2:1 link-local
D2(config-if)#ipv6 add 2001:db8:acad:3075::d2/64
D2(config-if)#no shut
D2(config-if)#exit
D2(config)#int gi1/0/1
D2(config-if)#switchport mode trunk
Command rejected: An interface whose
trunk encapsulation is "Auto" can not be configured to "trunk"
mode.
D2(config-if)#switchport trunk native vlan 999
D2(config-if)#switchport trunk allowed vlan 75,85,999
D2(config-if)#no shut
D2(config-if)#exit
R3(config)#int gig0/0/0
R3(config-if)#no shutdown
R3(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/0, changed state to up
R3(config-if)#int gig0/0/0.75
R3(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/0.75, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/0.75, changed state to up
R3(config-subif)#enca
R3(config-subif)#encapsulation dot1q 75
R3(config-subif)#ip add 10.3.75.1 255.255.255.0
R3(config-subif)#ipv6 add fe80::3:2 link-local
R3(config-subif)#ipv6 add 2001:db8:acad:3075::1/64
R3(config-subif)#no shut
R3(config-subif)#exit
R3(config)#int gig0/0/0.85
R3(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/0.85, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/0.85, changed state to up
R3(config-subif)#encapsulation dot1q 85
R3(config-subif)#ip add 10.3.85.1 255.255.255.0
R3(config-subif)#ipv6 add fe80::3:3 link-local
R3(config-subif)#ipv6 add 2001:db8:acad:3085::1/64
R3(config-subif)#no shut
R3(config-subif)#int g0/0/0.999
R3(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/0.999, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/0.999, changed state to up
R3(config-subif)#enc
R3(config-subif)#encapsulation dot1q 999 native
R3(config-subif)#no shut
R3(config-subif)#
PC3 için default gataway olarak 10.3.75.1 verdik. ve ipv6 olarak
2001:db8:acad:3075::1
PC4 için 10.3.85.1 ve 2001:db8:acad:3085::1
R3(config)#int s0/1/0
R3(config-if)#ip add 10.1.3.3 255.255.255.0
R3(config-if)#ipv6 add fe80::3:1 link-local
R3(config-if)#ipv6 add 2001:db8:acad:1013::3/64
%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up
R3(config-if)#exit
R3(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to up
R3(config)#
R3(config)#ip route 0.0.0.0 0.0.0.0 10.1.3.1
R3(config)#ipv6 route ::/0 2001:db8:acad:1013::1