Application of VRRP and DHCP

Preface

VRRP (Virtual Routing Redundancy Protocol) is a routing protocol proposed by the IETF to solve the single-point failure of static gateways configured in LANs. In 1998, the formal RFC2338 protocol standard was launched. VRRP is widely used in edge networks. Its design goal is to support the failover of IP data traffic under certain circumstances without causing confusion, allowing hosts to use a single router, and maintaining the router even if the actual first-hop router fails to use. Connectivity between.
DHCP (automatic acquisition) is a network protocol for local area networks. It means that the server controls a range of IP addresses, and the client can automatically obtain the IP address and subnet mask assigned by the server when logging in to the server. By default, DHCP, as a service component of Windows Server, will not be automatically installed by the system. Administrators also need to install it manually and perform necessary configuration.

1. VRRP

1. Function

Provides a device backup mechanism on the LAN. VRRP is a fault-tolerant protocol. It protects the next-hop router of the host as the gateway of the gateway user, so that the host on the network communicates with the virtual router without knowing anything about the physical router on the network. information.

2 Principle

The responsibility of a virtual router is dynamically allocated to one of the VRRP routers on the LAN. The VRRP router that controls the IP address of the virtual router is called the master router, and it is responsible for forwarding data packets to these virtual IP addresses. Once the main router is unavailable, this selection process provides a dynamic failover mechanism, which allows the IP address of the virtual router to be the default first-hop router for the end host. All hosts in a local area network are set with default routes. When the destination address sent by the hosts in the network is not in this network segment, the packets will be sent to the external router through the default route, thus realizing the communication between the host and the external network.

3 configuration

VRRP configuration
vlan bat 10 20 Create vlan
int vlan 10 Enter the logical interface
ip address 192.168.10.2 24 Configure the IP address and mask
vrrp vrid 1 virtual-ip 192.168.10.1 This is the virtual IP address
vrrp vrid 1 priority 120 120 is the priority default 100 more Da Yue priority
vrrp vrid 1 preempt-mode timer delay 6 Configure the preemption time of the master device to 6 seconds to prevent frequent switching (default is 0, preempt immediately)
vrrp vrid 1 track interface g0/0/1 reduced 30 Tracking the router Uplink port, once the port fails, the master priority will be reduced by 30 (default is 10)
vrrp vrid 1 track interface g0/0/2 to monitor the downlink port (can not write)

Two DHCP

1 definition

DHCP is a network protocol for local area networks. It means that the server controls a range of IP addresses, and the client can automatically obtain the IP address and subnet mask assigned by the server when logging in to the server. By default, DHCP, as a service component of Windows Server, will not be automatically installed by the system. Administrators also need to install it manually and perform necessary configuration.

2 role

1 Automatically assign IP addresses to intranets or network services
2 To users or internal network administrators as a means of central management of all computers

3 benefits

Reduce the workload,
avoid the possibility of input errors, and
avoid IP address conflicts.
When changing the IP address, do not re-assign each user's ip, which
improves the utilization of the IP address and
facilitates the configuration of the client.

4 configuration

Divided into two types: 1 interface configuration 2 global configuration

DHCP interface configuration

dhcp enable Enable DHCP function
int g0/0/0 Enter interface
dhcp select interface Configure DHCP based on interface
dhcp server lease day 7 Configure interface-based DHCP Servser lease
dhcp server excluded-ip-address 192.168.20.200 192.168.20.210 Configure interface address pool The ip address that does not participate in the allocation is 192.168.200-210
dhcp server dns-list 8.8.8.8 The dns server address is automatically allocated to the client.

2Global mode
DHCP global mode
Insert picture description here

dhcp enable Enable DHCP
ip pool 1 Create the address pool name
gateway-list 192.168.20.2 Set the export gateway name of the DHCP client
network 192.168.20.0 mask 24 Configure the DHCP assignable address network segment address and mask.
dns-list 114.114.114.114 Configure DHCP to assign DNS
excluded-ip-address 192.168.20.250 192.168.20.254 Configure reserved address
static-bind ip-address 192.168.20.2 mac-address 5489-9818-60A5 Fix this ip to this computer
lease day 20 lease day 20
int g0/0/0 Enter interface
dhcp select global Configure DHCP as the global
display ip pool View IP address information

Guess you like

Origin blog.csdn.net/weixin_49172531/article/details/112169742