发布网友 发布时间:2022-04-24 04:39
共1个回答
热心网友 时间:2023-10-28 22:46
楼主,你好
配置非常简单,
如下,
我先说一下思路。
1.首先,
要求PC从VLAN20的R1获取到ip地址
那么涉及到的是DHCP中继。
需要在三层交换机上SW1上做如下命令
interface vlan 10
ip helper-address R1 f0/0 的ip地址
PC开启自动获取ip地址即可。
2.其次
要求全网互通,注意到R2上还有一个32位掩码的loopback接口
如果用静态的话,配置步骤多,
可以配置一个IGP协议,比如OSPF
即可实现互通。
具体配置如下
R2:
interface Loopback0
ip address 192.168.1.1 255.255.255.255
interface FastEthernet0/0
ip address 192.168.0.2 255.255.255.252
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 192.168.0.0 0.0.0.3 area 0
network 192.168.1.1 0.0.0.0 area 0
SW1:
vlan 10
vlan 20
interface FastEthernet0/0
switchport access vlan 10
interface FastEthernet1/14
switchport access vlan 20
interface FastEthernet1/15
no switchport
ip address 192.168.0.1 255.255.255.252
interface Vlan10
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.20.2
interface Vlan20
ip address 192.168.20.1 255.255.255.0
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 1 stub no-summary
network 192.168.0.0 0.0.0.3 area 0
network 192.168.10.0 0.0.0.255 area 1
network 192.168.20.0 0.0.0.255 area 1
R1:
ip dhcp excluded-address 192.168.10.1
ip dhcp pool 10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 202.103.24.68 202.103.44.150
interface FastEthernet1/0
ip address 192.168.20.2 255.255.255.0
PC:
interface f0/0
no shutdown
ip address dhcp
热心网友 时间:2023-10-28 22:46
楼主,你好
配置非常简单,
如下,
我先说一下思路。
1.首先,
要求PC从VLAN20的R1获取到ip地址
那么涉及到的是DHCP中继。
需要在三层交换机上SW1上做如下命令
interface vlan 10
ip helper-address R1 f0/0 的ip地址
PC开启自动获取ip地址即可。
2.其次
要求全网互通,注意到R2上还有一个32位掩码的loopback接口
如果用静态的话,配置步骤多,
可以配置一个IGP协议,比如OSPF
即可实现互通。
具体配置如下
R2:
interface Loopback0
ip address 192.168.1.1 255.255.255.255
interface FastEthernet0/0
ip address 192.168.0.2 255.255.255.252
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 192.168.0.0 0.0.0.3 area 0
network 192.168.1.1 0.0.0.0 area 0
SW1:
vlan 10
vlan 20
interface FastEthernet0/0
switchport access vlan 10
interface FastEthernet1/14
switchport access vlan 20
interface FastEthernet1/15
no switchport
ip address 192.168.0.1 255.255.255.252
interface Vlan10
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.20.2
interface Vlan20
ip address 192.168.20.1 255.255.255.0
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 1 stub no-summary
network 192.168.0.0 0.0.0.3 area 0
network 192.168.10.0 0.0.0.255 area 1
network 192.168.20.0 0.0.0.255 area 1
R1:
ip dhcp excluded-address 192.168.10.1
ip dhcp pool 10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 202.103.24.68 202.103.44.150
interface FastEthernet1/0
ip address 192.168.20.2 255.255.255.0
PC:
interface f0/0
no shutdown
ip address dhcp
热心网友 时间:2023-10-28 22:46
楼主,你好
配置非常简单,
如下,
我先说一下思路。
1.首先,
要求PC从VLAN20的R1获取到ip地址
那么涉及到的是DHCP中继。
需要在三层交换机上SW1上做如下命令
interface vlan 10
ip helper-address R1 f0/0 的ip地址
PC开启自动获取ip地址即可。
2.其次
要求全网互通,注意到R2上还有一个32位掩码的loopback接口
如果用静态的话,配置步骤多,
可以配置一个IGP协议,比如OSPF
即可实现互通。
具体配置如下
R2:
interface Loopback0
ip address 192.168.1.1 255.255.255.255
interface FastEthernet0/0
ip address 192.168.0.2 255.255.255.252
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 192.168.0.0 0.0.0.3 area 0
network 192.168.1.1 0.0.0.0 area 0
SW1:
vlan 10
vlan 20
interface FastEthernet0/0
switchport access vlan 10
interface FastEthernet1/14
switchport access vlan 20
interface FastEthernet1/15
no switchport
ip address 192.168.0.1 255.255.255.252
interface Vlan10
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.20.2
interface Vlan20
ip address 192.168.20.1 255.255.255.0
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 1 stub no-summary
network 192.168.0.0 0.0.0.3 area 0
network 192.168.10.0 0.0.0.255 area 1
network 192.168.20.0 0.0.0.255 area 1
R1:
ip dhcp excluded-address 192.168.10.1
ip dhcp pool 10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 202.103.24.68 202.103.44.150
interface FastEthernet1/0
ip address 192.168.20.2 255.255.255.0
PC:
interface f0/0
no shutdown
ip address dhcp
热心网友 时间:2023-10-28 22:46
楼主,你好
配置非常简单,
如下,
我先说一下思路。
1.首先,
要求PC从VLAN20的R1获取到ip地址
那么涉及到的是DHCP中继。
需要在三层交换机上SW1上做如下命令
interface vlan 10
ip helper-address R1 f0/0 的ip地址
PC开启自动获取ip地址即可。
2.其次
要求全网互通,注意到R2上还有一个32位掩码的loopback接口
如果用静态的话,配置步骤多,
可以配置一个IGP协议,比如OSPF
即可实现互通。
具体配置如下
R2:
interface Loopback0
ip address 192.168.1.1 255.255.255.255
interface FastEthernet0/0
ip address 192.168.0.2 255.255.255.252
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 192.168.0.0 0.0.0.3 area 0
network 192.168.1.1 0.0.0.0 area 0
SW1:
vlan 10
vlan 20
interface FastEthernet0/0
switchport access vlan 10
interface FastEthernet1/14
switchport access vlan 20
interface FastEthernet1/15
no switchport
ip address 192.168.0.1 255.255.255.252
interface Vlan10
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.20.2
interface Vlan20
ip address 192.168.20.1 255.255.255.0
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 1 stub no-summary
network 192.168.0.0 0.0.0.3 area 0
network 192.168.10.0 0.0.0.255 area 1
network 192.168.20.0 0.0.0.255 area 1
R1:
ip dhcp excluded-address 192.168.10.1
ip dhcp pool 10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 202.103.24.68 202.103.44.150
interface FastEthernet1/0
ip address 192.168.20.2 255.255.255.0
PC:
interface f0/0
no shutdown
ip address dhcp
热心网友 时间:2023-10-28 22:46
楼主,你好
配置非常简单,
如下,
我先说一下思路。
1.首先,
要求PC从VLAN20的R1获取到ip地址
那么涉及到的是DHCP中继。
需要在三层交换机上SW1上做如下命令
interface vlan 10
ip helper-address R1 f0/0 的ip地址
PC开启自动获取ip地址即可。
2.其次
要求全网互通,注意到R2上还有一个32位掩码的loopback接口
如果用静态的话,配置步骤多,
可以配置一个IGP协议,比如OSPF
即可实现互通。
具体配置如下
R2:
interface Loopback0
ip address 192.168.1.1 255.255.255.255
interface FastEthernet0/0
ip address 192.168.0.2 255.255.255.252
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 192.168.0.0 0.0.0.3 area 0
network 192.168.1.1 0.0.0.0 area 0
SW1:
vlan 10
vlan 20
interface FastEthernet0/0
switchport access vlan 10
interface FastEthernet1/14
switchport access vlan 20
interface FastEthernet1/15
no switchport
ip address 192.168.0.1 255.255.255.252
interface Vlan10
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.20.2
interface Vlan20
ip address 192.168.20.1 255.255.255.0
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 1 stub no-summary
network 192.168.0.0 0.0.0.3 area 0
network 192.168.10.0 0.0.0.255 area 1
network 192.168.20.0 0.0.0.255 area 1
R1:
ip dhcp excluded-address 192.168.10.1
ip dhcp pool 10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 202.103.24.68 202.103.44.150
interface FastEthernet1/0
ip address 192.168.20.2 255.255.255.0
PC:
interface f0/0
no shutdown
ip address dhcp