In an enterprise, intranet users in departments A and B can communicate with each other and access the Internet.
As shown in Figure 1, on a small-sized campus network, S2700 switches are typically deployed as access switches (such as ACC1) at the access layer, S6700 switches as core switches (such as CORE) at the core layer, and AR routers as egress routers (such as Router).
The access switches are connected to the core switch through Eth-Trunks to ensure reliability.
A VLAN is assigned to each department and services are transmitted between departments at Layer 3 through VLANIF interfaces of the switch CORE.
The core switch functions as a DHCP server to allocate IP addresses to users in the campus.
The DHCP snooping function is configured on access switches to prevent intranet users from connecting to unauthorized routers to obtain IP addresses. The IPSG function is configured to prevent intranet users from changing their IP addresses.
Operation |
Item |
Data |
Description |
---|---|---|---|
Configuring the management IP address |
IP address of the management interface |
10.10.1.1/24 |
This IP address is used for users to log in to the switch through the management interface. |
Configuring interfaces and VLANs |
Eth-Trunk working mode |
Static Link Aggregation Control Protocol (LACP) mode |
Eth-Trunks work in manual load balancing mode or static LACP mode. |
Interface type |
Interfaces connected to switches are configured as trunk interfaces and interfaces connected to PCs are configured as access interfaces. |
A trunk interface is typically used to connect to a switch. An access interface is typically used to connect to a PC. A hybrid interface can connect to either a switch or a PC. |
|
VLAN ID |
ACC1: VLAN 10 ACC2: VLAN 20 CORE: VLANs 100, 10, and 20 |
The default VLAN of a switch is VLAN 1. To isolate departments A and B at Layer 2, add department A to VLAN 10 and department B to VLAN 20. The switch CORE connects to the egress router through VLANIF 100. |
|
Configuring DHCP |
DHCP server |
CORE |
The DHCP server is deployed on the core switch. |
Address pool |
VLAN 10: VLANIF 10 VLAN 20: VLANIF 20 |
Terminals in department A obtain IP addresses from the address pool on VLANIF 10. Terminals in department B obtain IP addresses from the address pool on VLANIF 20. |
|
Configuring routes on the core switch |
IP routes |
VLANIF 100: 10.10.100.1/24 VLANIF 10: 10.10.10.1/24 VLANIF 20: 10.10.20.1/24 |
The IP address of VLANIF 100 is used for the switch CORE to connect to the egress router and for the internal network to communicate with the Internet. On the core switch, configure a default route and set the next-hop IP address to the IP address of the egress router. After the IP addresses of VLANIF 10 and VLANIF 20 are configured on the switch CORE, departments A and B can communicate through the switch. |
Configuring the egress router |
IP address of the public network interface |
Ethernet0/0/1: 1.1.1.2/30 |
Ethernet0/0/1 connects the egress router to the Internet. |
IP address of the public network gateway |
1.1.1.1/30 |
It is the IP address of the carrier's device connected to the egress router. On the egress router, configure a default route to this IP address for forwarding network traffic to the Internet. |
|
DNS server address |
2.2.2.2 |
The DNS server resolves a domain name into an IP address. |
|
IP address of an intranet interface |
Ethernet0/0/2: 10.10.100.2/24 |
Ethernet0/0/2 connects the egress router to the intranet. |
|
Configuring DHCP snooping and IPSG |
Trusted port |
Eth-Trunk 1 |
N/A |
The configuration roadmap is as follows:
A switch using factory settings can be logged in to through the web system for the first time. The following uses the switch CORE as an example to describe how to log in to a switch through the web system for the first time. The login methods of switches ACC1 and ACC2 are similar to that of the switch CORE.
The switch that does not have the MODE button and does not use factory settings cannot be logged in to through the web system for the first time. However, subsequent logins through the web system are supported. For details, see Web System Login.
Configure the DHCP server on CORE to assign IP address to users in departments A (VLAN 10) and B (VLAN 20).
Before configuring the egress router, you need the following data: IP address of the public network interface (1.1.1.2/30), IP address of the public network gateway (1.1.1.1), and DNS server address (2.2.2.2). These parameters are provided by carriers when the broadband service is applied. The data used in this example is for reference only.
ACL Rule ID |
Action |
Source IP Address/Prefix Length (Wildcard) |
---|---|---|
5 |
Permit |
10.10.10.0/0.0.0.255 |
10 |
Permit |
10.10.20.0/0.0.0.255 |
15 |
Permit |
10.10.100.0/0.0.0.255 |
Destination IP Address |
Subnet Mask |
Next Hop |
---|---|---|
10.10.10.0 |
255.255.255.0 |
10.10.100.1 |
10.10.20.0 |
255.255.255.0 |
10.10.100.1 |
0.0.0.0 |
0.0.0.0 |
1.1.1.1 |
After the DHCP function is configured, intranet users in departments can automatically obtain IP addresses. To prevent intranet users from connecting to an unauthorized router and enabling the DHCP function, configure the DHCP snooping function so that intranet valid users can connect to the Internet successfully. Additionally, to prevent intranet users from changing their IP addresses to attack the network, enable the IPSG function on access switches. ACC1 is used as an example.
Click Save in the upper right corner. The system saves all configurations to the configuration file.
Use department A as an example, and assume that the IP address obtained by PC2 through DHCP is 10.10.10.100. Figure 25 shows the test result.
Users in departments A and B communicate with each other at Layer 3 through VLANIF interfaces of CORE. If the ping test between PC1 and PC3 succeeds, these two departments can communicate with each other at Layer 3 through VLANIF interfaces. The ping command is similar to that in the first step.
Use department A as an example, and ping the IP address of the public network gateway (IP address of the carrier's device connected to the egress router) from PC1 to check whether intranet users can access the Internet. If the ping test succeeds, intranet users can access the Internet normally. The ping command is similar to that in the first step.