请对这些设备进行配置使得:
- PC0,PC1 所在网段为20.20.20.0/24;PC2所在网段为30.30.30.0/24;PC3所在网段为40.40.40.0/24。
- 请给各个路由器配上适当IP地址和静态路由使得PC0、PC1、PC2、PC3能够互联互通。
IP:
PC0:
20.20.20.2
255.255.255.0
20.20.20.1
PC1:
20.20.20.3
255.255.255.0
20.20.20.1
PC2:
30.30.30.2
255.255.255.0
30.30.30.1
PC3:
40.40.40.2
255.255.255.0
40.40.40.1
R0 Fa0/0:
202.199.100.1
R1 Fa0/0:
202.199.100.2
R1 Fa0/1:
202.199.200.1
R1 Eth1/0:
202.200.100.1
R2 Fa0/0:
202.199.200.2
R3 Fa0/0:
202.200.100.2
R0——R1:
202.199.100.0/30
R1—R2:
202.199.200.0/30
R1——R3:
202.200.100.0/30
S0
ena
conf
vlan 100
ex
interface range fastEthernet 0/1-10
switchport access vlan 100
no shutdown
interface fastEthernet 0/24
switchport mode trunk
no shutdown
ex
R0
ena
conf
interface fastEthernet 0/1.1
encapsulation dot1Q 100
ip address 20.20.20.1 255.255.255.0
no shutdown
ex
interface fastEthernet 0/1
no shutdown
ex
interface fastEthernet 0/0
ip address 202.199.100.1 255.255.255.0
no shutdown
ex
ip route 202.200.100.0 255.255.255.0 202.199.100.2
ip route 30.30.30.1 255.255.255.0 202.199.100.2
ip route 202.199.200.0 255.255.255.0 202.199.100.2
ip route 40.40.40.0 255.255.255.0 202.199.100.2
R1
ena
conf
interface fastEthernet 0/0
ip address 202.199.100.2 255.255.255.0
no shutdown
ex
interface fastEthernet 0/1
ip address 202.199.200.1 255.255.255.0
no shutdown
ex
interface ethernet 1/0
ip address 202.200.100.1 255.255.255.0
no shutdown
ex
ip route 20.20.20.0 255.255.255.0 202.199.100.1
ip route 30.30.30.0 255.255.255.0 202.200.100.2
ip route 40.40.40.0 255.255.255.0 202.199.200.2
R2
ena
conf
interface fastEthernet 0/1
ip address 40.40.40.1 255.255.255.0
no shutdown
ex
interface fastEthernet 0/0
ip address 202.199.200.2 255.255.255.0
no shutdown
ex
ip route 202.200.100.0 255.255.255.0 202.199.200.1
ip route 30.30.30.0 255.255.255.0 202.199.200.1
ip route 202.199.100.0 255.255.255.0 202.199.200.1
ip route 20.20.20.0 255.255.255.0 202.199.200.1
R3
ena
conf
interface fastEthernet 0/1
ip address 30.30.30.1 255.255.255.0
no shutdown
ex
interface fastEthernet 0/0
ip address 202.200.100.2 255.255.255.0
no shutdown
ex
ip route 20.20.20.0 255.255.255.0 202.200.100.1
ip route 202.199.100.0 255.255.255.0 202.200.100.1
ip route 202.199.200.0 255.255.255.0 202.200.100.1
ip route 40.40.40.0 255.255.255.0 202.200.100.1
PC0接0/1
PC1接0/2
PC2接0/1
PC3接0/1
S0(0/24)接0/1
S1(0/24)接0/1
S2(0/24)接0/1
R0(Fa0/0)接R1(Fa0/0)
R1(Fa0/1)接R2(Fa0/0)
R3(Fa0/0)接R1(Eth1/0)
PC0
PC1
PC2
PC3