sample lab topologies for Vlan trunk


# Simple Ethernet Switch lab
# cau hinh nay da duoc toi u tren may tinh cong ty
autostart = False

[localhost]
ghostios = true
sparsemem = true
mmap = True
workingdir = D:\Working\DYNAGEN\1R3745-2SW2691-4PC3620
[[3745]]
image = C:\Program Files\Dynamips\images\c3745-adventerprisek9-mz.124-12.bin
ram = 160
slot2 = NM-4T
[[2691]]
image = C:\Program Files\Dynamips\images\c2691-entbasek9-mz.124-12.bin
ram = 128
slot1 = NM-16ESW
[[3620]]
image = C:\Program Files\Dynamips\images\c3620-io3-mz.122-32.bin
ram = 32
slot1 = NM-1E

[[ROUTER SW1]]
model = 2691
f1/12 = SW2 f1/12
f1/1 = PC1 f0/0
# 192.168.1.1
f1/2 = PC2 f0/0 # 192.168.2.1
console = 2005
idlepc = 0x60691994

[[ROUTER SW2]]
model = 2691
f1/1 = PC3 f0/0 # 192.168.1.2
f1/2 = PC4 f0/0 # 192.168.2.2
console = 2006
idlepc = 0xffffffff8000ad08

[[router R1]]
model = 3745
console = 2007
f0/0 = SW1 f1/0
idlepc = 0xffffffff8000a8ac
#idlepc = 0xffffffff8000b4d8
#idlepc = 0xffffffff8000b518
[[router PC1]]
model = 3620
console = 2011
idlepc = 0xffffffff8000a154
#idlepc = 0xffffffff8000ac28
[[router PC2]]
model = 3620
console = 2008
idlepc = 0xffffffff8000a154
#idlepc = 0xffffffff8000ac88
[[router PC3]]
model = 3620
console = 2009
idlepc = 0xffffffff8000a154
#idlepc = 0xffffffff8000ac28
[[router PC4]]
model = 3620
console = 2010
idlepc = 0xffffffff8000ac28

PC1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
PC1(config)#no ip routing
PC1(config)#ip default-gateway 192.168.1.10
PC1(config)#interface e0/0
PC1(config-if)#ip address 192.168.1.1 255.255.255.0
PC1(config-if)#no shutdown
PC1(config-if)#end
PC1#
PC2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
PC2(config)#no ip routing
PC2(config)#ip default-gateway 192.168.2.20
PC2(config)#interface e0/0
PC2(config-if)#ip address 192.168.2.1 255.255.255.0
PC2(config-if)#no shutdown
PC2(config-if)#end
PC2#
PC3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
PC3(config)#no ip routing
PC3(config)#ip default-gateway 192.168.1.10
PC3(config)#interface e0/0
PC3(config-if)#ip address 192.168.1.2 255.255.255.0
PC3(config-if)#no shutdown
PC3(config-if)#end
PC3#
PC4#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
PC4(config)#no ip routing
PC4(config)#ip default-gateway 192.168.2.20
PC4(config)#interface e0/0
PC4(config-if)#ip address 192.168.2.2 255.255.255.0
PC4(config-if)#no shutdown
PC4(config-if)#end
PC4#
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface FastEthernet0/0
R1(config-if)#no shutdown
R1(config-if)#interface FastEthernet0/0.10
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#ip address 192.168.1.10 255.255.255.0
R1(config-subif)#interface FastEthernet0/0.20
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip address 192.168.2.20 255.255.255.0
R1(config-subif)#end
R1#

------SW1-------
SW1#vlan database
SW1(vlan)#vlan 10 name vlan10
VLAN 10 modified:
Name: vlan10
SW1(vlan)#vlan 20 name vlan20
VLAN 20 added:
Name: vlan20
SW1(vlan)#exit
APPLY completed.
Exiting....
SW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#interface f1/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 10
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#interface f1/2
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 20
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#interface f1/12
SW1(config-if)#switchport mode trunk
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#interface f1/0
SW1(config-if)#switchport mode trunk
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#no shutdown
SW1(config-if)#end
SW1#
------SW2-------
SW2#vlan database
SW2(vlan)#vlan 10 name vlan10
VLAN 10 modified:
Name: vlan10
SW2(vlan)#vlan 20 name vlan20
VLAN 20 modified:
Name: vlan20
SW2(vlan)#exit
APPLY completed.
Exiting....
SW2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#interface f1/1
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 10
SW2(config-if)#no shutdown
SW2(config-if)#exit
SW2(config)#interface f1/2
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 20
SW2(config-if)#no shutdown
SW2(config-if)#exit
SW2(config)#interface f1/12
SW2(config-if)#switchport mode trunk
SW2(config-if)#switchport trunk encapsulation dot1q
SW2(config-if)#no shutdown
SW2(config-if)#end
SW2#

Nhận xét

Bài đăng phổ biến từ blog này

Ký tự viết tắt trong chat & email

dung lượng RAM lớn nhất mà HĐH cấu trúc 32-bit nhận được

Ubuntu LAMP Server