Overview
Take the following topology as an example to introduce how to implement communication between PC1 and PC2.
...
Device | Interface | VLAN and IP Address |
Switch A | te-1/1/1 | VLAN: 10 IP address: 10.10.10.1/24 |
te-1/1/2 | VLAN: 4 IP address: 10.10.4.1/24 | |
te-1/1/3 | VLAN: 5 IP address: 10.10.5.2/24 | |
Switch B | te-1/1/1 | VLAN: 3 IP address: 10.10.3.1/24 |
te-1/1/2 | VLAN: 4 IP address: 10.10.4.2/24 | |
Switch C | te-1/1/1 | VLAN: 2 IP address: 10.10.2.1/24 |
te-1/1/3 | VLAN: 5 IP address: 10.10.5.1/24 | |
PC1 | 10.10.3.8/24 | |
PC2 | 10.10.2.8/24 |
Procedure
Before configuring the following steps, make sure you have logged in the specified switch through Console port or SSH. For detailed information, see Initial Setup and Configuring the SSH Access.
...
Code Block |
---|
admin@SwitchA# set vlans vlan-id 4
admin@SwitchA# set interface gigabit-ethernet te-1/1/2 family ethernet- admin@SwitchA# switching native-vlan-id 4
admin@SwitchA# set vlans vlan-id 4 l3-interface vlan4
admin@SwitchA# set l3-interface vlan-interface vlan4 address 10.10.4.1 prefix-length 24
admin@SwitchA# commit |
...
Code Block |
---|
admin@SwitchC# set l3-interface loopback lo address 3.3.3.3 prefix-length 32 admin@SwitchC# set protocols ospf router-id 3.3.3.3 admin@SwitchC# set protocols ospf network 10.10.2.0/24 area 1 admin@SwitchC# set protocols ospf network 10.10.5.0/24 area 1 admin@SwitchC# commit |
Verifying the Configuration
View the routing table of each switch.
...