Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

...

Step3       Configure the IP address and default gateway of PC1 and PC2.

PC1:

Code Block
root@UbuntuDockerGuest-1:~# ifconfig eth0 PC1> ip 10.10.3.8/24
root@UbuntuDockerGuest-1:~# route add default gw  255.255.255.0 10.10.3.1
Checking for duplicate address...
PC1 : 10.10.3.8 255.255.255.0 gateway 10.10.3.1

PC2:

Code Block
root@UbuntuDockerGuest-2:~# ifconfig eth0 PC2> ip 10.10.2.8/24
root@UbuntuDockerGuest-2:~# route add default gw 255.255.255.0 10.10.2.1
Checking for duplicate address...
PC2 : 10.10.2.8 255.255.255.0 gateway 10.10.2.1

Step4       Configure the routing. You can configure the static routing or OSPF routing to connect network.

...

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.

...