Use three-tier exchange to achieve different network segments, different vlan exchange

GNS3 icon

Previous achieved using Trunkdo inter-switch VLANcommunications, which use a three-tier exchange to try to achieve different network segments, different VLANcommunication between.


Lab topology

Topology

A switch connected to the three following a switcher, then the following two connection switcher VPC, address planning follows:

name interface VLAN address
PC1 SW1-f1/1 vlan 10 192.168.10.10/24
PC2 SW1-f1/2 vlan 20 192.168.20.10/24
name interface address
SW2 vlan 10 192.168.10.1/24
SW2 vlan 20 192.168.20.1/24

Configuration

SW2(config)#int vlan 10
SW2(config-if)#ip address 192.168.10.1 255.255.255.0
SW2(config-if)#no shutdown 

Configuration process

SW1

  • SW1Close routing
SW1#conf t
SW1(config)#no ip routing 
  • SW1Creating VLAN 10and VLAN 20and add the interface.
SW1(config)#vlan 10,20
SW1(config-vlan)#ex
SW1(config)#int f1/1
SW1(config-if)#sw m a 
SW1(config-if)#sw a v 10
SW1(config-if)#int f1/2
SW1(config-if)#sw m a
SW1(config-if)#sw a v 20
SW1(config-if)#ex
SW1(config)#do show vlan-sw b

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0, Fa1/3, Fa1/4, Fa1/5
                                                Fa1/6, Fa1/7, Fa1/8, Fa1/9
                                                Fa1/10, Fa1/11, Fa1/12, Fa1/13
                                                Fa1/14, Fa1/15
10   VLAN0010                         active    Fa1/1
20   VLAN0020                         active    Fa1/2
1002 fddi-default                     act/unsup 
1003 token-ring-default               act/unsup 
1004 fddinet-default                  act/unsup 
1005 trnet-default                    act/unsup 
  • SW1ConfigurationTrunk
SW1(config)#int f1/0
SW1(config-if)#sw m t
SW1(config-if)#sw t e d

SW2

  • SW2Create VLAN 10and VLAN 20and configureTrunk
SW2#conf t
SW2(config)#vlan 10,20
SW2(config-vlan)#ex
SW2(config)#int f1/0
SW2(config-if)#sw m t
SW2(config-if)#sw t e d
SW2(config-if)#ex
  • Virtual interface configuration ipaddress, and view
SW2(config)#int vlan 10
SW2(config-if)#ip address 192.168.10.1 255.255.255.0
SW2(config-if)#no shutdown 
SW2(config-if)#int vlan 20
SW2(config-if)#ip add 192.168.20.1 255.255.255.0
SW2(config-if)#no sh
SW2(config-if)#do show ip int b   
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down    
FastEthernet0/1            unassigned      YES unset  administratively down down    
FastEthernet1/0            unassigned      YES unset  up                    up      
FastEthernet1/1            unassigned      YES unset  up                    down    
FastEthernet1/2            unassigned      YES unset  up                    down    
FastEthernet1/3            unassigned      YES unset  up                    down    
FastEthernet1/4            unassigned      YES unset  up                    down    
FastEthernet1/5            unassigned      YES unset  up                    down    
FastEthernet1/6            unassigned      YES unset  up                    down    
FastEthernet1/7            unassigned      YES unset  up                    down    
FastEthernet1/8            unassigned      YES unset  up                    down    
FastEthernet1/9            unassigned      YES unset  up                    down    
FastEthernet1/10           unassigned      YES unset  up                    down    
FastEthernet1/11           unassigned      YES unset  up                    down    
FastEthernet1/12           unassigned      YES unset  up                    down    
FastEthernet1/13           unassigned      YES unset  up                    down    
FastEthernet1/14           unassigned      YES unset  up                    down    
FastEthernet1/15           unassigned      YES unset  up                    down    
Vlan1                      unassigned      YES unset  up                    up      
Vlan10                     192.168.10.1    YES manual up                    up      
Vlan20                     192.168.20.1    YES manual up                    up      

PING test

PC1> ip 192.168.10.10 192.168.10.1
Checking for duplicate address...
PC1 : 192.168.10.10 255.255.255.0 gateway 192.168.10.1

PC1> ping 192.168.20.10
192.168.20.10 icmp_seq=1 timeout
84 bytes from 192.168.20.10 icmp_seq=2 ttl=63 time=14.115 ms
84 bytes from 192.168.20.10 icmp_seq=3 ttl=63 time=18.948 ms
84 bytes from 192.168.20.10 icmp_seq=4 ttl=63 time=18.066 ms
84 bytes from 192.168.20.10 icmp_seq=5 ttl=63 time=11.972 ms
PC2> ip 192.168.20.10 192.168.20.1
Checking for duplicate address...
PC1 : 192.168.20.10 255.255.255.0 gateway 192.168.20.1

PC2> ping 192.168.10.10           
84 bytes from 192.168.10.10 icmp_seq=1 ttl=63 time=20.966 ms
84 bytes from 192.168.10.10 icmp_seq=2 ttl=63 time=16.993 ms
84 bytes from 192.168.10.10 icmp_seq=3 ttl=63 time=14.945 ms
84 bytes from 192.168.10.10 icmp_seq=4 ttl=63 time=16.883 ms
84 bytes from 192.168.10.10 icmp_seq=5 ttl=63 time=18.054 ms

To achieve a different network segments, different vlanexchange.

At last

About GNS3 on some experimental operation has ended, and recently several experimental write a bit hasty, just write the main part, the latter will gradually be optimized.

About networking basics principles and the like, such as finishing a wave of free will, of consolidating knowledge.

Guess you like

Origin www.cnblogs.com/llife/p/11330092.html