Linux network based three-layer switch and NAT address translation notes

  
        1: Layer 3 switches can solve the problem of single-arm routing traffic bottlenecks, which is mainly accomplished by multiple routes of one route.

2: Layer 3 switch principle: look up once through the routing table, record the mac address and destination mac address later, form a mapping relationship between the routing table and the arp table, and then pass through the different VLANs again. Hardware to forward data.

3: The Layer 3 switch can be configured with a routing table. The virtual VLAN can be created to configure the corresponding VLAN gateway.

4: The ip address of the switch is configured to remotely manage the switch. The ip virtual port of the switch in the LAN is configured as the same vlan

5: Each vlan has a mac address.

Configuration steps: 1: Enable virtual vlan port. 2: Enable routing function ip routing 3: Create remote configuration vlan virtual port 2: NAT configuration 1: NAT is divided into: a, static conversion, will be an intranet The address is bound to an external public address. Suitable for publishing server b, dynamic conversion, automatically convert all internal network addresses into one or more public addresses, suitable for intranet access. c, port multiplexing (PAT), by connecting the internal network and the port together into a public address to achieve Internet access. Three: NAT configuration on the router A: Static conversion configuration 1: Enter the configure terminal mode, enter the command ip nat inside source static Private address public address 2: Open the internal NAT port to enter the port to use the NAT function, enter the command ip nat inside Enable NAT service 3: Open the external NAT port to enter the port to use the NAT function, enter the command ip nat outside to enable the NAT service B: Dynamically convert the configuration 1: Enter the configure terminal mode, enter access-list 1 172.16.0.0 0.0.0.255 (mask Code inverse code), here set the network segment that controls the NAT conversion. Such as 172.16.0.0. List 1 represents the code of the network segment. 2: Create an address pool, configure mode. Enter ip nat pool pool_name A.B.C.D (starting public IP) A.B.C.D (end public IP) netmask 255.255.255.0. 3: Bind the control table to the address pool, configure mode, enter ip nat inside source list 1 pool pool_name . 4: As with the static configuration, start the internal and external NAT ports. 5: show run Check if the configuration is successful. note! The maximum IP address of the NAT configured here is the total number of public IPs. After all allocations, other private IPs cannot access the Internet. C: Port multiplexing configuration a. Bind a public IP address Like the dynamic configuration, the dynamic pool configuration is ip nat pool pool_name 172.15.10.10 172.15.10.10 Bind dynamic IP pool ip nat inside source list 1 pool pool_name overload , Dynamic conversion adds one more parameter overload. b. In case the public IP is also dynamically allocated, the port can be bound. The command is: ip nat inside source list 1 interface fa0/0

Copyright © Windows knowledge All Rights Reserved