get a router a switch and 2 pc's...
connect a straight through cable from the router to a port on a switch... remove the ip address from the fa0/0 first and always, when making subinterfaces (frame and ppp too)... make two subinterfaces on the router
encap dot1q 21 means what it says; encapsulation dot1q for vlan 21...
give each sub ip's on different subnets (intervlan routing; now i got a network boner)
r2620_02#config t
Enter configuration commands, one per line. End with CNTL/Z.
r2620_02(config)#int fa0/0.21
r2620_02(config-subif)#encap dot1q 21
r2620_02(config-subif)#ip add 192.168.21.1 255.255.255.0
r2620_02(config-subif)#no shut
r2620_02(config-subif)#int fa0/0.22
r2620_02(config-subif)#encap dot1q 22
r2620_02(config-subif)#ip add 192.168.22.1 255.255.255.0
r2620_02(config-subif)#no shut
r2620_02(config-subif)#
swich time..
make two vlans, make a trunk (assigning vlans to the trunk is optional, why, because they forward all vlan traffic by default unless otherwise slapped around), put an interface into each vlan and you got...
s2(config-vlan)#name 21
s2(config-vlan)#vlan 22
s2(config-vlan)#name 22
s2(config-vlan)#exit
s2(config)#int fa0/17
s2(config-if)#sw mode trunk
s2(config-if)#sw trunk allow vlan 21,22
s2(config-if)#exit
s2(config)#int fa0/15
s2(config-if)#sw mode acc
s2(config-if)#sw acc vlan 21
s2(config-if)#int fa0/16
s2(config-if)#sw mode acc
s2(config-if)#sw acc vlan 22
s2(config-if)#do sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/5
10 fac/staff active Fa0/11, Fa0/12, Fa0/13, Fa0/14
20 students active Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24
21 21 active Fa0/15
22 22 active Fa0/16
connect a pc to each switch port and set ip's and gateways...
and then ping the damn things... don't forget to debug ip icmp on the router, see after pc pings...
C:\Users\bosgood>ping 192.168.21.1
Pinging 192.168.21.1 with 32 bytes of data:
Reply from 192.168.21.1: bytes=32 time=2ms TTL=255
Reply from 192.168.21.1: bytes=32 time=1ms TTL=255
Reply from 192.168.21.1: bytes=32 time=1ms TTL=255
Reply from 192.168.21.1: bytes=32 time=2ms TTL=255
Ping statistics for 192.168.21.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
C:\Users\bosgood>ping 192.168.22.1
Pinging 192.168.22.1 with 32 bytes of data:
Reply from 192.168.22.1: bytes=32 time=2ms TTL=255
Reply from 192.168.22.1: bytes=32 time=2ms TTL=255
Reply from 192.168.22.1: bytes=32 time=1ms TTL=255
Reply from 192.168.22.1: bytes=32 time=1ms TTL=255
Ping statistics for 192.168.22.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
r2620_02#debug ip icmp
ICMP packet debugging is on
r2620_02#
Dec 22 18:47:13.575: ICMP: echo reply sent, src 192.168.21.1, dst 192.168.21.2
r2620_02#
Dec 22 18:47:14.575: ICMP: echo reply sent, src 192.168.21.1, dst 192.168.21.2
r2620_02#
Dec 22 18:47:15.579: ICMP: echo reply sent, src 192.168.21.1, dst 192.168.21.2
r2620_02#
Dec 22 18:47:16.583: ICMP: echo reply sent, src 192.168.21.1, dst 192.168.21.2
r2620_02#
Dec 22 18:49:39.983: ICMP: echo reply sent, src 192.168.22.1, dst 192.168.22.2
r2620_02#
Dec 22 18:49:40.987: ICMP: echo reply sent, src 192.168.22.1, dst 192.168.22.2
r2620_02#
Dec 22 18:49:41.987: ICMP: echo reply sent, src 192.168.22.1, dst 192.168.22.2
r2620_02#
Dec 22 18:49:42.991: ICMP: echo reply sent, src 192.168.22.1, dst 192.168.22.2
r2620_02#
that's a router on my...
No comments:
Post a Comment