我遇到了这个教程:
Topology:
[Client PC] --- ge-0/0/0 [EX Switch] ge0/0/1 --- [DHCP Server]
Client PC is in VLAN 10.
The DHCP server is in VLAN 20 with the 20.20.20.2 IP address.
The EX switch is configured as DHCP relay and performs inter VLAN routing between VLANs 10 and 20.
Configuration:
set vlans vlan10 vlan-id 10
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members vlan10
set vlans vlan10 l3-interface vlan.10
set interfaces vlan unit 10 family inet address 10.10.10.1/24
set vlans vlan20 vlan-id 20
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members vlan20
set interfaces vlan unit 20 family inet address 20.20.20.1/24
set vlans vlan20 l3-interface vlan.20
set forwarding-options helpers bootp server 20.20.20.2
set forwarding-options helpers bootp interface vlan.10
Note: VLAN.10 Routed VLAN Interface (RVI) is configured for bootp relay, so that bootp packets in VLAN 10 will be routed to the '20.20.20.2' server in VLAN 20. Configure the specific RVIs, to which the bootp packets should be forwarded. A separate server can be configured under the 'bootp interface vlan.X' stanza for only that specific VLAN. A global server IP can also be specified (as above), which is applicable for all RVI interfaces.
我有一个类似的设置,除了在同一台交换机上不是两个 vlan,我有两个交换机使用 OSPF 连接在一起。在我的代码中,我使用了相同的设置,但我想知道我需要多少个继电器。每个交换机上一个,还是没有 dhcp 服务器的交换机上只有一个?