Page 3
The H3C MSR documentation set includes 14 configuration guides, which describe the software features for the H3C MSR Series Routers and guide you through the software configuration procedures. These configuration guides also provide configuration examples to help you apply software features to different network scenarios.
Conventions This section describes the conventions used in this documentation set. Command conventions Convention Description Boldface Bold text represents commands and keywords that you enter literally as shown. Italic Italic text represents arguments that you replace with actual values. Square brackets enclose syntax choices (keywords or arguments) that are optional. Braces enclose a set of required syntax choices separated by vertical bars, from which { x | y | ...
Obtaining documentation You can access the most up-to-date H3C product documentation on the World Wide Web at http://www.h3c.com. Click the links on the top navigation bar to obtain different categories of product documentation: [Technical Support & Documents > Technical Documents]—Provides hardware installation, software...
Contents Configuring ARP ··························································································································································· 1 Overview ············································································································································································ 1 ARP message format ················································································································································ 1 ARP operating mechanism ······································································································································ 1 ARP table ··································································································································································· 2 Configuring a static ARP entry ········································································································································· 3 Setting the maximum number of dynamic ARP entries for a device ············································································ 4 ...
Page 8
Configuration procedure ······································································································································ 21 Configuring IP unnumbered ·········································································································································· 21 Configuration guidelines ······································································································································ 22 Configuration prerequisites ·································································································································· 22 Configuration procedure ······································································································································ 22 Displaying and maintaining IP addressing ················································································································· 22 IP address configuration example ································································································································ 23 ...
Page 9
DHCP server configuration examples ·························································································································· 48 Static IP address assignment configuration example························································································· 48 Dynamic IP address assignment configuration example ··················································································· 50 DHCP user class configuration example ············································································································· 51 Self-defined DHCP option configuration example ····························································································· 52 Troubleshooting DHCP server configuration ···············································································································...
Page 10
Displaying and maintaining DHCP snooping ············································································································· 75 DHCP snooping configuration examples ····················································································································· 76 Basic DHCP snooping configuration example ··································································································· 76 Option 82 configuration example ······················································································································· 77 Configuring the BOOTP client ··································································································································· 79 BOOTP application ························································································································································ 79 ...
Page 11
Applying the DDNS policy to an interface ················································································································ 107 Specifying the DSCP value for outgoing DDNS packets ························································································· 107 Displaying DDNS ························································································································································· 108 DDNS configuration examples ··································································································································· 108 DDNS configuration example with www.3322.org ······················································································· 108 DDNS configuration example with PeanutHull server ·····················································································...
Page 12
Bidirectional NAT for internal-to-external access ····························································································· 131 NAT Server for external-to-internal access ········································································································ 133 NAT Server for external-to-internal access through domain name ································································· 136 Bidirectional NAT for external-to-internal access through NAT Server ·························································· 138 NAT hairpin in C/S mode ································································································································· 141 ...
Configuring ARP This chapter describes how to configure the Address Resolution Protocol (ARP). Overview ARP resolves IP addresses into MAC addresses on Ethernet networks. ARP message format ARP uses two types of messages: ARP request and ARP reply. Figure 1 shows the format of ARP request/reply messages.
If Host A finds no entry for Host B, Host A buffers the packet and broadcasts an ARP request. The payload of the ARP request comprises the following information: Sender IP address and sender MAC address—Host A's IP address and MAC address. Target IP address—Host B's IP address.
Static ARP entry A static ARP entry is manually configured and maintained. It does not age out and cannot be overwritten by any dynamic ARP entry. Static ARP entries protect communication between devices because attack packets cannot modify the IP-to-MAC mapping in a static ARP entry. Static ARP entries include long and short ARP entries.
Step Command Remarks • Configure a long static ARP entry: arp static ip-address mac-address vlan-id interface-type interface-number Use either command. Configure a static ARP [ vpn-instance vpn-instance-name ] By default, no static ARP entry is entry. • Configure a short static ARP entry: configured.
Step Command Remarks Set the maximum number of If the value of the number argument is set dynamic ARP entries for the arp max-learning-num number to 0, the interface is disabled from interface. learning dynamic ARP entries. Setting the aging timer for dynamic ARP entries Each dynamic ARP entry in the ARP table has a limited lifetime, called an aging timer.
Configuring gratuitous ARP Overview In a gratuitous ARP packet, the sender IP address and the target IP address are the IP address of the sending device. A device sends a gratuitous ARP packet for either of the following purposes: Determine whether its IP address is already used by another device. If the IP address is already used, •...
If the virtual IP address of the VRRP group is associated with a virtual MAC address, the sender MAC address in the gratuitous ARP packet is the virtual MAC address of the virtual router. If the virtual IP address of the VRRP group is associated with the real MAC address of an interface, the sender MAC address in the gratuitous ARP packet is the MAC address of the interface on the master router in the VRRP group.
Step Command Remarks Enable periodic sending of arp send-gratuitous-arp [ interval By default, periodic sending of gratuitous ARP packets and milliseconds ] gratuitous ARP packets is disabled. set the sending interval. Enabling IP conflict notification By default, if the sender IP address of a received gratuitous ARP packet is being used by the receiving device, the receiving device sends a gratuitous ARP request, and it displays an error message after it receives an ARP reply about the conflict.
Configuring proxy ARP Proxy ARP enables a device on one network to answer ARP requests for an IP address on another network. With proxy ARP, hosts on different broadcast domains can communicate with each other as they would on the same broadcast domain. Proxy ARP includes common proxy ARP and local proxy ARP.
Displaying proxy ARP Execute display commands in any view. Task Command Display common proxy ARP status. display proxy-arp [ interface interface-type interface-number ] Display local proxy ARP status. display local-proxy-arp [ interface interface-type interface-number ] Common proxy ARP configuration example Network requirements As shown in Figure...
Page 28
# Configure the IP address of interface Ethernet 1/1. [Router] interface ethernet 1/1 [Router-Ethernet1/1] ip address 192.168.20.99 255.255.255.0 # Enable common proxy ARP on interface Ethernet 1/1. [Router-Ethernet1/1] proxy-arp enable [Router-Ethernet1/1] quit After the configuration, Host A and Host D can ping each other.
Configuring ARP snooping ARP snooping is not supported in the current release, and it is reserved for future use. ARP snooping is used in Layer 2 switching networks. It creates ARP snooping entries by using information in ARP packets. ARP fast-reply and manual-mode MFF (MAC–Forced Forwarding) can use the ARP snooping entries.
Configuring ARP fast-reply ARP fast-reply is not supported in the current release, and it is reserved for future use. Overview Function In a wireless network, APs are connected to an AC through tunnels, so that clients can communicate with the AC through APs and can further access the gateway through the AC. If a client broadcasts an ARP request through the associated AP, the AC needs to send the ARP request to all the other APs, wasting tunnel resources and affecting forwarding performance.
ARP fast-reply configuration example Network requirements As shown in Figure 5, Client 1, Client 2 through Client 100, and Client 101 through Client 200 access the network through AP 1, AP 2 and AP 3, respectively. AP 1, AP 2 and AP 3 are connected to AC through the switch.
Configuring IP addressing The IP addresses in this chapter refer to IPv4 addresses unless otherwise specified. This chapter describes IP addressing basic and manual IP address assignment for interfaces. Dynamic IP address assignment (BOOTP and DHCP) and PPP address negotiation are beyond the scope of this chapter.
Class Address range Remarks 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 Multicast addresses. Reserved for future use, except for the broadcast 240.0.0.0 to 255.255.255.255 address 255.255.255.255. Special IP addresses The following IP addresses are for special use and cannot be used as host IP addresses: IP address with an all-zero net ID—Identifies a host on the local network.
Assigning an IP address to an interface An interface must have an IP address to communicate with other hosts. You can either manually assign an IP address to an interface, or configure the interface to obtain an IP address through BOOTP, DHCP, or PPP address negotiation.
Configuration guidelines Follow these guidelines when you configure IP unnumbered: • Layer 3 Ethernet interfaces and loopback interfaces cannot borrow IP addresses of other interfaces, but other interfaces can borrow IP addresses of these interfaces. Synchronous and asynchronous serial interfaces, and dial-up interfaces can borrow IP addresses of •...
IP address configuration example Network requirements As shown in Figure 8, Ethernet 1/1 on the router is connected to a LAN comprising two segments: 172.16.1.0/24 and 172.16.2.0/24. To enable the hosts on the two network segments to communicate with the external network through the router, and to enable the hosts on the LAN to communicate with each other: Assign a primary IP address and a secondary IP address to Ethernet 1/1 on the router.
56 bytes from 172.16.1.2: icmp_seq=0 ttl=254 time=7.000 ms 56 bytes from 172.16.1.2: icmp_seq=1 ttl=254 time=0.000 ms 56 bytes from 172.16.1.2: icmp_seq=2 ttl=254 time=1.000 ms 56 bytes from 172.16.1.2: icmp_seq=3 ttl=254 time=1.000 ms 56 bytes from 172.16.1.2: icmp_seq=4 ttl=254 time=2.000 ms --- Ping statistics for 172.16.1.2 --- 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.000/2.200/7.000/2.482 ms...
DHCP overview The Dynamic Host Configuration Protocol (DHCP) provides a framework to assign configuration information to network devices. Figure 10 shows a typical DHCP application scenario where the DHCP clients and the DHCP server reside on the same subnet. The DHCP clients can also obtain configuration parameters from a DHCP server on another subnet through a DHCP relay agent.
Dynamic IP address allocation process Figure 11 Dynamic IP address allocation process The client broadcasts a DHCP-DISCOVER message to locate a DHCP server. Each DHCP server offers configuration parameters such as an IP address to the client in a DHCP-OFFER message. The sending mode of the DHCP-OFFER is determined by the flag field in the DHCP-DISCOVER message.
DHCP message format Figure 12 shows the DHCP message format. DHCP uses some of the fields in significantly different ways. The numbers in parentheses indicate the size of each field in bytes. Figure 12 DHCP message format • op—Message type defined in options field. 1 = REQUEST, 2 = REPLY htype, hlen—Hardware address type and length of the DHCP client.
DHCP options DHCP uses the same message format as BOOTP, but DHCP uses the options field to carry information for dynamic address allocation and provide additional configuration information to clients. Figure 13 DHCP option format Common DHCP options The following are common DHCP options: Option 3—Router option.
Page 46
Through Option 43, the DHCP client can obtain the PXE server address, which is used to obtain the boot file or other control information from the PXE server. Format of Option 43: Figure 14 Option 43 format Network configuration parameters are carried in different sub-options of Option 43 as shown Figure Sub-option type—The field value can be 0x02 (service provider identifier sub-option) or 0x80 (PXE server address sub-option).
Normal padding format—Contains the VLAN ID and interface number of the interface that • received the client's request. Verbose padding format—Contains the access node identifier specified by the user, and the VLAN • ID, interface number and interface type of the interface that received the client's request. Remote ID has the following padding formats: String padding format—Contains a character string specified by the user.
Configuring the DHCP server Overview The DHCP server is well suited to networks where: • Manual configuration and centralized management are difficult to implement. IP addresses are limited. For example, an ISP limits the number of concurrent online users, and users •...
Page 49
If the matching user class has no assignable addresses, the DHCP server matches the client against the next user class. If all the matching user classes have no assignable addresses, the DHCP server selects an IP address from the common address range. If the DHCP client does not match any DHCP user class, the DHCP server selects an address in the IP address range specified by the address range command.
IP address allocation sequence The DHCP server selects an IP address for a client in the following sequence: IP address statically bound to the client's MAC address or ID. IP address that was ever assigned to the client. IP address designated by the Option 50 field in the DHCP-DISCOVER message sent by the client. Option 50 is the Requested IP Address option.
Tasks at a glance Perform at least one of the following tasks: • Specifying IP address ranges for a DHCP address pool • Specifying gateways for the client • Specifying a domain name suffix for the client • Specifying DNS servers for the client •...
Page 52
Step Command Remarks Enter system view. system-view Required for client classification. Create a DHCP user class and dhcp class class-name enter DHCP user class view. By default, no DHCP user class exists. Required for client classification. if-match option option-code [ hex Configure the match rule for the hex-string [ offset offset length length By default, no match rule is...
Page 53
request, the DHCP server selects an address from the primary subnet. If no assignable address is found, the server selects an address from the secondary subnets in the order they are configured. In scenarios where the DHCP server and the DHCP clients reside on different subnets and the DHCP clients obtain IP addresses through a DHCP relay agent, the DHCP server needs to use the same address pool to assign IP addresses to clients in different subnets.
Step Command Remarks Except for the IP address of the DHCP server interface, IP addresses in all address pools (Optional.) Exclude the specified dhcp server forbidden-ip are assignable by default. IP addresses from dynamic start-ip-address [ end-ip-address ] allocation globally. To exclude multiple address ranges globally, repeat this step.
If you specify gateways in both address pool view and secondary subnet view, DHCP assigns the gateway addresses in the secondary subnet view to the clients on the secondary subnet. If you specify gateways in address pool view but not in secondary subnet view, DHCP assigns the gateway addresses in address pool view to the clients on the secondary subnet.
Specifying WINS servers and NetBIOS node type for the client A Microsoft DHCP client using NetBIOS protocol must contact a WINS server for name resolution. You can specify up to eight WINS servers for such clients in a DHCP address pool. In addition, you must specify a NetBIOS node type for the clients to approach name resolution.
Specifying the TFTP server and boot file name for the client To implement client auto-configuration, you must specify the IP address or name of a TFTP server and the boot file name for the clients, and there is no need to perform any configuration on the DHCP clients. A DHCP client obtains these parameters from the DHCP server, and uses them to contact the TFTP server to get the configuration file used for system initialization.
Configuring Option 184 parameters for the client To assign calling parameters to DHCP clients with voice service, you must configure Option 184 on the DHCP server. For more information about Option 184, see "Option 184." To configure option 184 parameters in a DHCP address pool: Step Command Remarks...
Step Command Remarks By default, the DHCP Enable the DHCP server on dhcp select server server on the interface the interface. is enabled. Applying an address pool on an interface Perform this task to apply a DHCP address pool on an interface. Upon receiving a DHCP request from the interface, the DHCP server assigns the statically bound IP address and configuration parameters from the address pool where the static binding is.
Enabling handling of Option 82 Perform this task to enable the DHCP server to handle Option 82. Upon receiving a DHCP request that contains Option 82, the DHCP server adds Option 82 into the DHCP response. If you disable the DHCP to handle Option 82, it does not add Option 82 into the response message. You must enable handling of Option 82 on both the DHCP server and the DHCP relay agent to ensure correct processing for Option 82.
To configure the DHCP server to ignore BOOTP requests: Step Command Remarks Enter system view. system-view Configure the DHCP server to By default, the DHCP server dhcp server bootp ignore ignore BOOTP requests. processes BOOTP requests. Configuring the DHCP server to send BOOTP responses in RFC 1048 format Not all BOOTP clients can send requests compatible with RFC 1048.
Displaying and maintaining the DHCP server IMPORTANT: A restart of the DHCP server or execution of the reset dhcp server ip-in-use command deletes all lease information. The DHCP server denies any DHCP request for lease extension, and the client must request an IP address again.
Page 64
0030-3030-662e-6532-3030-2e30-3030-322d-4574-6865-726e-6574-302f-30. The MAC address of the interface Ethernet 1/1 on Router C is 000f-e200-01c0. Figure 16 Network diagram Configuration procedure Specify an IP address for Ethernet 1/1 on Router A: <RouterA> system-view [RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] ip address 10.1.1.1 25 [RouterA-Ethernet1/1] quit Configure the DHCP server: # Enable DHCP.
Dynamic IP address assignment configuration example Network requirements As shown in Figure 17, the DHCP server (Router A) assigns IP address to clients on subnet • 10.1.1.0/24, which is subnetted into 10.1.1.0/25 and 10.1.1.128/25. The IP addresses of Ethernet 1/1 and Ethernet 1/2 on Router A are 10.1.1.1/25 and 10.1.1.129/25. •...
Configuration procedure Specify IP addresses for the interfaces on DHCP server. (Details not shown.) Configure DHCP: # Enable DHCP and configure the DHCP server to handle Option 82. <RouterB> system-view [RouterB] dhcp enable [RouterB] dhcp server relay information enable # Enable the DHCP server on the interface Ethernet1/1. [RouterB] interface Ethernet 1/1 [RouterB-Ethernet1/1] dhcp select server [RouterB-Ethernet1/1] quit...
Figure 19 Network diagram Configuration procedure Specify an IP address for interface Ethernet 1/1. (Details not shown.) Configure the DHCP server: # Enable DHCP. <RouterA> system-view [RouterA] dhcp enable # Enable the DHCP server on Ethernet 1/1. [RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] dhcp select server [RouterA-Ethernet1/1] quit # Configure DHCP address pool 0.
Page 69
Enable the network adapter or connect the network cable, release the IP address, and obtain another one on the client. For example, to release the IP address and obtain another one on a Windows XP DHCP client: In Windows environment, execute the cmd command to enter the DOS environment. Enter ipconfig /release to relinquish the IP address.
Configuring the DHCP relay agent Overview The DHCP relay agent enables clients to get IP addresses from a DHCP server on another subnet. This feature avoids deploying a DHCP server for each subnet to centralize management and reduce investment. Figure 20 shows a typical application of the DHCP relay agent.
Figure 21 DHCP relay agent operation DHCP relay agent support for Option 82 Option 82 records the location information about the DHCP client. It enables the administrator to locate the DHCP client for security and accounting purposes, and to assign IP addresses in a specific range to clients.
Tasks at a glance (Optional.) Configuring the DHCP relay agent to release an IP address (Optional.) Configuring Option 82 (Optional.) Setting the DSCP value for DHCP packets sent by the DHCP relay agent Enabling DHCP You must enable DHCP to validate other DHCP relay agent settings. To enable DHCP: Step Command...
To specify a DHCP server address on a relay agent: Step Command Remarks Enter system view. system-view interface interface-type Enter interface view. interface-number By default, no DHCP server Specify a DHCP server dhcp relay server-address address is specified on the relay address on the relay agent.
To enable periodic refresh of dynamic relay entries: Step Command Remarks Enter system view. system-view By default, periodic refresh of Enable periodic refresh of dhcp relay client-information refresh dynamic relay entries is dynamic relay entries. enable enabled. By default, the refresh interval Configure the refresh dhcp relay client-information refresh is auto, which is calculated...
Configuring the DHCP relay agent to release an IP address Configure the relay agent to release the IP address for a relay entry. The relay agent sends a DHCP-RELEASE message to the server and meanwhile deletes the relay entry. Upon receiving the DHCP-RELEASE message, the DHCP server releases the IP address.
Setting the DSCP value for DHCP packets sent by the DHCP relay agent The DSCP value of a packet specifies the priority level of the packet and affects the transmission priority of the packet. To set the DSCP value for DHCP packets sent by the DHCP relay agent: Step Command Remarks...
Because the DHCP relay agent and server are on different subnets, you need to configure static or dynamic routing to make them reachable to each other. DHCP server configuration is also required to guarantee the client-server communication through the DHCP relay agent. For DHCP server configuration information, see "DHCP server configuration examples ."...
Configuration procedure # Specify IP addresses for the interfaces. (Details not shown.) # Enable DHCP. <RouterA> system-view [RouterA] dhcp enable # Enable the DHCP relay agent on Ethernet 1/1. [RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] dhcp select relay # Specify the IP address of the DHCP server on the relay agent. [RouterA-Ethernet1/1] dhcp relay server-address 10.1.1.1 # Enable the DHCP relay agent to handle Option 82, and perform Option 82 related configurations.
Configuring the DHCP client With DHCP client enabled, an interface uses DHCP to obtain configuration parameters from the DHCP server, for example, an IP address. The DHCP client configuration is supported only on Layer 3 Ethernet interfaces (or subinterfaces) and VLAN interfaces.
DHCP client detects IP address conflict through ARP packets. An attacker can act as the IP address owner to send an ARP reply, making the client unable to use the IP address assigned by the server. H3C recommends you to disable duplicate address detection when ARP attacks exist on the network.
Step Command Remarks Set the DSCP value for DHCP By default, the DSCP value in DHCP packets packets sent by the DHCP dhcp dscp dscp-value sent by the DHCP client is 56. client. Displaying and maintaining the DHCP client Execute display command in any view. Task Command display dhcp client [ verbose ] [ interface interface-type...
Configuration procedure Configure Router A: # Specify the IP address of Ethernet 1/1. <RouterA> system-view [RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] ip address 10.1.1.1 24 [RouterA-Ethernet1/1] quit # Enable DHCP. [RouterA] dhcp enable # Exclude an IP address from dynamic allocation. [RouterA] dhcp server forbidden-ip 10.1.1.2 # Configure DHCP address pool 0 and specify the subnet, lease duration, DNS server address, and a static route to subnet 20.1.1.0/24.
Page 83
T1 will timeout in 3 days 19 hours 48 minutes 43 seconds. # Use the display ip routing-table command to display the route information on Router B. The output shows that a static route to network 20.1.1.0/24 is added to the routing table. [RouterB] display ip routing-table Destinations : 11 Routes : 11...
Configuring DHCP snooping DHCP snooping works between the DHCP client and server, or between the DHCP client and DHCP relay agent. It guarantees that DHCP clients obtain IP addresses from authorized DHCP servers. Also, it records IP-to-MAC bindings of DHCP clients (called DHCP snooping entries) for security purposes. DHCP snooping does not work between the DHCP server and DHCP relay agent.
Figure 25 Trusted and untrusted ports In a cascaded network as shown in Figure 26, configure each DHCP snooping device's ports connected to other DHCP snooping devices as trusted ports. To save system resources, you can disable the untrusted ports that are not directly connected to DHCP clients from generating DHCP snooping entries. Figure 26 Trusted and untrusted ports in a cascaded network DHCP snooping support for Option 82 Option 82 records the location information about the DHCP client so the administrator can locate the...
Table 4 Handling strategies If a DHCP request Handling DHCP snooping… has… strategy Drop Drops the message. Keep Forwards the message without changing Option 82. Option 82 Forwards the message after replacing the original Option 82 with Replace the Option 82 padded according to the configured padding format, padding content, and code type.
Step Command Remarks By default, all ports are untrusted Specify the port as a trusted dhcp snooping trust ports after DHCP snooping is port. enabled. Return to system view. quit interface interface-type This interface must connect to the Enter interface view. interface-number DHCP client.
Step Command Remarks (Optional.) Configure the By default, the padding dhcp snooping information remote-id padding content and code format is normal and the { normal [ format { ascii | hex } ] | [ vlan type for the remote ID code type is hex for the vlan-id ] string remote-id | sysname } sub-option.
Enabling DHCP starvation attack protection A DHCP starvation attack occurs when an attacker constantly sends forged DHCP requests that contain identical or different sender MAC addresses in the chaddr field to a DHCP server. This attack exhausts the IP address resources of the DHCP server so legitimate DHCP clients cannot obtain IP addresses. The DHCP server might also fail to work because of exhaustion of system resources.
Step Command Remarks Enter system view. system-view interface interface-type Enter interface view. interface-number By default, DHCP-REQUEST check is disabled. dhcp snooping check Enable DHCP-REQUEST check. You can enable DHCP-REQUEST request-message check only on Layer 2 Ethernet interfaces. Configuring DHCP packet rate limit Perform this task to configure the maximum rate at which an interface can receive DHCP packets.
Task Command Remarks Display information about the file that Available in any display dhcp snooping binding database stores DHCP snooping entries. view. reset dhcp snooping binding { all | ip Available in user Clear DHCP snooping entries. ip-address [ vlan vlan-id ] } view.
[Router-Ethernet1/2] dhcp snooping binding record [Router-Ethernet1/2] quit Verifying the configuration After the preceding configuration is complete, the DHCP client can obtain an IP address and other configuration parameters only from the authorized DHCP server. You can view the DHCP snooping entry recorded for the client with the display dhcp snooping binding command.
Page 93
[Router] interface ethernet 1/3 [Router-Ethernet1/3] dhcp snooping information enable [Router-Ethernet1/3] dhcp snooping information strategy replace [Router-Ethernet1/3] dhcp snooping information circuit-id verbose node-identifier sysname format ascii [Router-Ethernet1/3] dhcp snooping information remote-id string device001 Verifying the configuration Use the display dhcp snooping information command to display Option 82 configuration information on Ethernet 1/2 and Ethernet 1/3 on the DHCP snooping device.
Configuring the BOOTP client BOOTP client configuration only applies to Layer 3 Ethernet interfaces (including subinterfaces) and VLAN interfaces. If several VLAN interfaces sharing the same MAC address obtain IP addresses through a BOOTP relay agent, the BOOTP server cannot be a Windows Server 2000 or Windows Server 2003. BOOTP application An interface that acts as a BOOTP client can use BOOTP to obtain information (such as IP address) from the BOOTP server.
Configuring an interface to use BOOTP for IP address acquisition Step Command Remarks Enter system view. system-view interface interface-type Enter interface view. interface-number By default, an interface does not Configure an interface to use ip address bootp-alloc use BOOTP for IP address BOOTP for IP address acquisition.
Configuring DNS Overview Domain Name System (DNS) is a distributed database used by TCP/IP applications to translate domain names into IP addresses. With DNS, you can use easy-to-remember domain names in some applications and let the DNS server translate them into correct IP addresses. The domain name-to-IP address mapping is called a DNS entry.
Figure 29 shows the relationship between the user program, DNS client, and DNS server. The DNS client is made up of the resolver and cache. The user program and DNS client can run on the same device or different devices, but the DNS server and the DNS client usually run on different devices. Dynamic domain name resolution allows the DNS client to store latest DNS entries in the dynamic domain name cache.
Figure 30 DNS proxy application A DNS proxy operates as follows: A DNS client considers the DNS proxy as the DNS server, and sends a DNS request to the DNS proxy. The destination address of the request is the IP address of the DNS proxy. The DNS proxy searches the local static domain name resolution table and dynamic domain name resolution cache after receiving the request.
Figure 31 DNS spoofing application DNS spoofing enables the DNS proxy to send a spoofed reply with a configured IP address even if it cannot reach the DNS server. Without DNS spoofing, the proxy does not answer or forward a DNS request if it cannot find a matching DNS entry and it cannot reach the DNS server.
Tasks at a glance (Optional.) Configuring the DNS trusted interface (Optional.) Specifying the DSCP value for outgoing DNS packets Configuring the IPv4 DNS client Configuring static domain name resolution Static domain name resolution allows applications such as Telnet to contact hosts by using host names instead of IPv4 addresses.
You can specify DNS server IPv6 addresses for the public network and up to 1024 VPNs, and • specify a maximum of six DNS server IPv6 addresses for the public network or each VPN. An IPv4 name query is first sent to the DNS server IPv4 addresses. If no reply is received, it is sent •...
Configuring dynamic domain name resolution To send DNS queries to a correct server for resolution, you must enable dynamic domain name resolution and configure DNS servers. A DNS server manually configured takes precedence over the one dynamically obtained through DHCP, and a DNS server configured earlier takes precedence. A name query is first sent to the DNS server that has the highest priority.
A DNS proxy forwards an IPv4 name query first to IPv4 DNS servers, and if no reply is received, it forwards the request to IPv6 DNS servers. The DNS proxy forwards an IPv6 name query first to IPv6 DNS servers, and if no reply is received, it forwards the request to IPv4 DNS servers. To configure the DNS proxy: Step Command...
DNS servers. In some scenarios, the DNS server only responds to DNS requests sourced from a specific IP address. In such cases, you must specify the source interface for the DNS packets so that the device can always uses the primary IP address of the specified source interface as the source IP address of DNS packets.
Specifying the DSCP value for outgoing DNS packets The DSCP value of a packet specifies the priority level of the packet and affects the transmission priority of the packet. A bigger DSCP value represents a higher priority. To specify the DSCP value for outgoing DNS packets: Step Command Remarks...
Figure 32 Network diagram Configuration procedure # Configure a mapping between host name host.com and IP address 10.1.1.2. <Sysname> system-view [Sysname] ip host host.com 10.1.1.2 # Use the ping host.com command to verify that the device can use static domain name resolution to resolve domain name host.com into IP address 10.1.1.2.
Page 107
Configuration procedure Before performing the following configuration, make sure the device and the host can reach each other, and that the IP addresses of the interfaces are configured as shown in Figure Configure the DNS server: The configuration might vary with DNS servers. The following configuration is performed on a PC running Windows Server 2000.
Page 108
Figure 35 Adding a host On the page that appears, enter host name host and IP address 3.1.1.1. Click Add Host. The mapping between the IP address and host name is created. Figure 36 Adding a mapping between domain name and IP address Configure the DNS client:...
# Specify the DNS server 2.1.1.2. <Sysname> system-view [Sysname] dns server 2.1.1.2 # Specify com as the name suffix. [Sysname] dns domain com Verifying the configuration # Use the ping host command on the device to verify that the communication between the device and the host is normal and that the translated destination IP address is 3.1.1.1.
Page 110
Figure 37 Network diagram Configuration procedure Before performing the following configuration, ,make sure Device A, the DNS server, and the host can reach each other and the IPv6 addresses of the interfaces are configured as shown in Figure Configure the DNS server: The configuration might vary with DNS servers.
round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms IPv6 DNS configuration examples Static domain name resolution configuration example Network requirements As shown in Figure 38, the device wants to access the host by using an easy-to-remember domain name rather than an IPv6 address. Configure static domain name resolution on the device so that the device can use the domain name host.com to access the host whose IPv6 address is 1::2.
Page 112
Figure 39 Network diagram Configuration procedure Before performing the following configuration, make sure the device and the host can reach each other, and the IPv6 addresses of the interfaces are configured, as shown Figure Configure the DNS server: The configuration might vary with DNS servers. The following configuration is performed on a PC running Windows Server 2003.
Page 113
Figure 41 Creating a record On the page that appears, select IPv6 Host (AAAA) as the resource record type.
Page 114
Figure 42 Selecting the resource record type Type host name host and IPv6 address 1::1. Click OK. The mapping between the IPv6 address and host name is created.
Page 115
Figure 43 Adding a mapping between domain name and IPv6 address Configure the DNS client: # Specify the DNS server 2::2. <Device> system-view [Device] ipv6 dns server 2::2 # Configure com as the DNS suffix. [Device] dns domain com Verifying the configuration # Use the ping ipv6 host command on the device to verify that the communication between the device and the host is normal and that the translated destination IP address is 1::1.
DNS proxy configuration example Network requirements When the IP address of the DNS server changes, you must configure the new IP address of the DNS server on each device on the LAN. To simplify network management, you can use the DNS proxy function.
Verifying the configuration # Use the ping ipv6 host.com command on Device B to verify that the connection between the device and the host is normal and that the translated destination IP address is 3000::1. [DeviceB] ping ipv6 host.com Ping6(56 data bytes) 2000::1 --> 3000::1, press escape sequence to break 56 bytes from 3000::1, icmp_seq=0 hlim=128 time=1.000 ms 56 bytes from 3000::1, icmp_seq=1 hlim=128 time=0.000 ms 56 bytes from 3000::1, icmp_seq=2 hlim=128 time=1.000 ms...
Configuring DDNS Overview DNS provides only the static mappings between domain names and IP addresses. When the IP address of a node changes, your access to the node fails. Dynamic Domain Name System (DDNS) can dynamically update the mappings between domain names and IP addresses for DNS servers to direct you to the latest IP address mapping to a domain name.
NOTE: The DDNS update process does not have a unified standard but depends on the DDNS server that the DDNS client contacts. DDNS client configuration task list Tasks at a glance (Required.) Configuring a DDNS policy (Required.) Applying the DDNS policy to an interface (Optional.) Specifying the DSCP value for outgoing DDNS packets Configuring a DDNS policy...
HP and GNUDIP are common DDNS update protocols. The server-name parameter is the domain name or IP address of the service provider's server using one of the update protocols. The URL address for an update request can start with: http://—The HTTP-based DDNS server. •...
Step Command Remarks Specify a username to be username username By default, no username is specified. included in the URL address. Specify a password to be included password { cipher | By default, no password is specified. in the URL address. simple } password (Optional.) Specify the interval for interval days [ hours...
To specify the DSCP value for outgoing DDNS packets: Step Command Remarks Enter system view. system-view Specify the DSCP value By default, the DSCP value for for outgoing DDNS ddns dscp dscp-value outgoing DDNS packets is 0. packets. Displaying DDNS Execute display commands in any view.
Configuration procedure Before configuring DDNS on Router, register with username steven and password nevets at http://www.3322.org/, add Router's host name-to-IP address mapping to the DNS server, and make sure the devices can reach each other. # Create a DDNS policy named 3322.org, and enter its view. <Router>...
Page 125
Figure 47 Network diagram www.oray.cn DDNS server Eth1/1 IP network Router DDNS client 1.1.1.1 DNS server Configuration procedure Before configuring DDNS on Router, register with username steven and password nevets at http://www.oray.cn/, add Router's host name-to-IP address mapping to the DNS server, and make sure the devices can reach each other.
Configuring NAT Network Address Translation (NAT) translates an IP address in the IP packet header to another IP address. Typically, NAT is configured on gateways to enable private users to access an external network and to enable external users to access private network resources such as a Web server. Figure 48 shows how NAT works.
NAT address An IP address for translation, which can be manually specified or dynamically allocated. The address in the external network must be routable from the NAT address. NAT entry An entry recording the translation between a private and a public address on a NAT device. For more information, see "NAT entries."...
layer protocol, and VPN instance in an ACL rule for packet matching. Only packets matching an ACL permit rule are processed by NAT. NAT features Static NAT Static NAT uses a fixed translation of a real address to a NAT address. Because the NAT address is the same for each consecutive connection, static NAT allows bidirectional access to and from the host.
Figure 49 PAT operation Figure 49 for an example. Packets 1 and 2 with different source ports are from Host A, and Packets 3 with the same source port as packet 1 is from Host B. PAT maps the source IP addresses of the three packets to the same NAT address and uses different port numbers to make each unique.
Figure 50 NAT Server operation Direction Before NAT After NAT Inbound 20.1.1.1:8080 192.168.1.3:8080 Dst : 192.168.1.3:8080 Dst : 20.1.1.1:8080 Server Host 192.168.1.1 20.1.1.1 Internet Intranet 20.1.1.2 192.168.1.3 Src : 20.1.1.1:8080 Src : 192.168.1.3:8080 The host in the public network sends a packet destined for the public IP address and port number of the server in the private network.
NAT entries NAT session entry NAT translates the IP address of the first packet in a session and creates a NAT session entry for recording the mappings. The NAT session entry contains extended NAT information, such as interface and translation method. Subsequent packets of the session are translated by using this entry. The session management module maintains the updating and aging of NAT session entries.
Upon receiving a request from a user in an MPLS VPN to an external network, NAT translates the private source IP address and port number to a NAT IP address and port number, and records the MPLS VPN information, such as the VPN name. When a response packet arrives, NAT translates the destination IP address and port number to the private IP address and port number, and forwards the packet to the target MPLS VPN.
NAT translates only IP addresses and port numbers in packet headers and does not analyze fields in application layer payload. However, the packet payloads of some protocols might contain IP address or port information, which might cause problems if not translated. For example, an FTP application involves both data connection and control connection.
When the destination IP address of a packet from the public matches the global-ip, the destination • IP address is translated into the local-ip. To configure outbound one-to-one static NAT: Step Command Remarks Enter system view. system-view By default, no mappings exist. nat static outbound local-ip Configure a one-to-one [ vpn-instance local-name ]...
Configuring inbound one-to-one static NAT Configure inbound one-to-one static NAT for address translation between a private IP address and a public IP address. • When the source IP address of a packet from the public network to the private network matches the global-ip, the IP address is translated to the local-ip.
Step Command Remarks Enable static NAT on the nat static enable By default, static NAT is disabled. interface. Configuring dynamic NAT Dynamic NAT implements address translation by mapping a group of IP addresses to a smaller number of NAT addresses. You can specify an address group (or the IP address of an interface) and ACL to implement dynamic NAT on the NAT interface.
NAT interface, and the next hop is the source address before translation. If you do not specify this keyword, you must add the route manually. H3C recommends that you manually specify a route because it takes time to add routes automatically.
Step Command Remarks Configure an address nat address-group group-number By default, no address group exists. group and enter its view. By default, no group member exists. You can add multiple members to an Add a group member to address start-address end-address address group.
Step Command Remarks • A single global address with a single or no global port: nat server protocol pro-type global { global-address | current-interface | interface interface-type interface-number } [ global-port ] [ vpn-instance global-name ] inside local-address [ local-port ] [ vpn-instance local-name ] [ acl acl-number ] •...
Outbound dynamic NAT for internal-to-external access (non-overlapping addresses) Network requirements As shown in Figure 53, a company has a segment address 192.168.0.0/16 and two public IP addresses 202.38.1.2 and 202.38.1.3. Configure outbound dynamic NAT to allow only internal users on segment 192.168.1.0/24 to access the Internet.
Page 145
202.38.1.2 202.38.1.3 NAT outbound information: There are 1 NAT outbound rules. Interface: GigabitEthernet1/2 ACL: 2000 Address group: 0 Port-preserved: N NO-PAT: N Reversible: N NAT logging: Log enable : Disabled Flow-begin : Disabled Flow-end : Disabled Flow-active: Disabled NAT mapping behavior: Mapping mode: Address and Port-Dependent : --- NAT ALG:...
Bidirectional NAT for internal-to-external access Network requirements As shown in Figure 54, the IP address of the Web server is 192.168.1.10, and it overlaps with internal network 192.168.1.0/24, where the hosts reside. The company has two public IP addresses 202.38.1.2 and 202.38.1.3.
Page 147
[Router] nat address-group 1 # Add address 202.38.1.2 to the group. [Router-nat-address-group-1] address 202.38.1.2 202.38.1.2 [Router-nat-address-group-1] quit # Create address group 2. [Router] nat address-group 2 # Add address 202.38.1.3 to the group. [Router-nat-address-group-2] address 202.38.1.3 202.38.1.3 [Router-nat-address-group-2] quit # Enable inbound NO-PAT on interface GigabitEthernet 1/2 to translate the source IP address in the DNS reply payload into the address in address group 1, and allow reversible NAT.
Flow-end : Disabled Flow-active: Disabled NAT mapping behavior: Mapping mode: Address and Port-Dependent : --- NAT ALG: DNS: Enabled FTP: Enabled H323: Enabled ICMP-ERROR: Enabled # Use the display nat session verbose command to display NAT session information generated when Host A accesses the Web server.
Page 149
Figure 55 Network diagram 10.110.10.1/16 10.110.10.2/16 Web server 1 Web server 2 GE1/1 GE1/2 10.110.10.10/16 202.38.1.1/24 Internet Router Host FTP server SMTP server 10.110.10.3/16 10.110.10.4/16 Configuration procedure # Specify IP addresses for the interfaces. (Details not shown.) # Enter interface view of GigabitEthernet 1/2. <Router>...
Page 150
Interface: GigabitEthernet1/2 Protocol: 6(TCP) Global IP/port: 202.38.1.1/25 Local IP/port: 10.110.10.4/25 Interface: GigabitEthernet1/2 Protocol: 6(TCP) Global IP/port: 202.38.1.1/80 Local IP/port: 10.110.10.1/80 Interface: GigabitEthernet1/2 Protocol: 6(TCP) Global IP/port: 202.38.1.1/8080 Local IP/port: 10.110.10.2/80 NAT logging: Log enable : Disabled Flow-begin : Disabled Flow-end : Disabled Flow-active: Disabled NAT mapping behavior:...
Interface(out): GigabitEthernet1/1 Initiator->Responder: 7 packets 308 bytes Responder->Initiator: 5 packets 312 bytes Total sessions found: 1 NAT Server for external-to-internal access through domain name Network requirements As shown in Figure 56, Web server at 0.1 10.10.2/24 in the internal network provides services for external users.
Page 152
# Add address 202.38.1.3 to the group. [Router-nat-address-group-1] address 202.38.1.3 202.38.1.3 [Router-nat-address-group-1] quit # Configure NAT Server on interface GigabitEthernet 1/2 to map the address 202.38.1.1 to 10.1 10.10.3. External users can access the internal DNS server. [Router] interface gigabitethernet 1/2 [Router-GigabitEthernet1/2] nat server protocol udp global 202.38.1.2 inside 10.110.10.3 domain # Enable outbound NO-PAT on interface GigabitEthernet 1/2, use the address in address group 1 to...
FTP: Enabled H323: Enabled ICMP-ERROR: Enabled # Use the display nat session verbose command to display NAT session information generated when Host accesses Web server. [Router] display nat session verbose Initiator: Source IP/port: 202.1.1.2/1694 Destination IP/port: 202.38.1.3/8080 VPN instance/VLAN ID/VLL ID: -/-/- Protocol: TCP(6) Responder: Source...
Page 154
Figure 57 Network diagram Configuration considerations This is a typical application of bidirectional NAT. To make sure the external host to access the internal Web server by using its domain name, • configure NAT Server so that the external host can access the internal DNS server to obtain the IP address of the Web server.
Page 155
# Add address 202.38.1.3 to the address group. [Router-nat-address-group-2] address 202.38.1.3 202.38.1.3 [Router-nat-address-group-2] quit # Configure NAT Server on interface GigabitEthernet 1/2 to allow external hosts to access the internal DNS server by using the address 202.38.1.4. [Router] interface gigabitethernet 1/2 [Router-GigabitEthernet1/2] nat server protocol udp global 202.38.1.4 inside 200.1.1.3 domain # Enable outbound NO-PAT on interface GigabitEthernet 1/2 to translate IP address of the Web server...
Local IP/port: 200.1.1.3/53 NAT logging: Log enable : Disabled Flow-begin : Disabled Flow-end : Disabled Flow-active: Disabled NAT mapping behavior: Mapping mode: Address and Port-Dependent : --- NAT ALG: DNS: Enabled FTP: Enabled H323: Enabled ICMP-ERROR: Enabled # Use the display nat session verbose command to display NAT session information generated when Host accesses the Web server.
Page 157
Figure 58 Network diagram Configuration considerations This is a typical NAT hairpin application in C/S mode. Configure NAT Server on the interface that connects the external network to make sure an external • host can access the internal FTP server by using a NAT address. Enable NAT hairpin on the interface that connects the internal network to make sure internal hosts •...
Page 158
Verifying the configuration After completing the configurations, both internal and external hosts can access the internal FTP server through the external address. # Display all NAT configuration and statistics. [Router]display nat all NAT outbound information: There are 1 NAT outbound rules. Interface: GigabitEthernet1/2 ACL: 2000 Address group: ---...
VPN instance/VLAN ID/VLL ID: -/-/- Protocol: TCP(6) State: TCP_ESTABLISHED Application: HTTP Start time: 2012-08-15 14:53:29 TTL: 3597s Interface(in) : GigabitEthernet1/1 Interface(out): GigabitEthernet1/1 Initiator->Responder: 7 packets 308 bytes Responder->Initiator: 5 packets 312 bytes Total sessions found: 1 NAT hairpin in P2P mode for access between internal users Network requirements In the P2P application, internal clients must register their IP address to the external server and the server records the registered IP addresses and port numbers of the internal clients.
Page 160
Configuration procedure # Specify IP addresses for the interfaces. (Details not shown.) # Configure ACL 2000, and create a rule to permit packets only from segment 192.168.1.0/24 to be translated. <Router> system-view [Router] acl number 2000 [Router-acl-basic-2000] rule permit source 192.168.1.0 0.0.0.255 [Router-acl-basic-2000] quit # Configure outbound dynamic PAT with Easy IP on interface GigabitEthernet 1/2.
NAT ALG: DNS: Enabled FTP: Enabled H323: Enabled ICMP-ERROR: Enabled # Use the display nat session verbose command to display NAT session information generated when Client A accesses Client B. [Router] display nat session verbose Initiator: Source IP/port: 192.168.1.3/44929 Destination IP/port: 202.38.1.3/1 VPN instance/VLAN ID/VLL ID: -/-/- Protocol: UDP(17) Responder:...
Page 162
Configuration considerations This is a typical application of twice NAT. Both the source and destination addresses of packets between the two VPNs need to be translated. Configure static NAT on both interfaces that connects the VPNs on the NAT device. Configuration procedure # Specify VPN instances and IP addresses for the interfaces.
Flow-begin : Disabled Flow-end : Disabled Flow-active: Disabled NAT mapping behavior: Mapping mode: Address and Port-Dependent : --- NAT ALG: DNS: Enabled FTP: Enabled H323: Enabled ICMP-ERROR: Enabled # Use the display nat session verbose command to display NAT session information generated when Host A accesses Host B.
Page 164
Figure 61 Network diagram 10.110.10.1/16 FTP server 1 GE1/1 GE1/2 10.110.10.10/16 202.38.1.1/16 Internet Router Host FTP server 2 FTP server 3 10.110.10.2/16 10.110.10.3/16 Configuration procedure # Specify IP addresses for the interfaces. (Details not shown.) # Create NAT Server group 0, and add members to the group. <Router>...
10.110.10.2/21 (Connections: 2) 10.110.10.3/21 (Connections: 2) NAT logging: Log enable : Disabled Flow-begin : Disabled Flow-end : Disabled Flow-active: Disabled NAT mapping behavior: Mapping mode: Address and Port-Dependent : --- NAT ALG: DNS: Enabled FTP: Enabled H323: Enabled ICMP-ERROR: Enabled # Use the display nat session verbose command to display NAT session information generated when external hosts access an internal FTP server.
Page 166
Configure NAT so that: • The public IP address 202.38.1.2 is used by external users to access the Web and FTP servers. External users can use the public address or domain name of internal servers to access them. • Internal users can access the internal servers by using their domain names. •...
Page 167
Verifying the configuration After completing the configurations, both internal and external hosts can access the internal servers by using domain names. # Display all NAT configuration and statistics. [Router] display nat all NAT outbound information: There are 1 NAT outbound rules. Interface: GigabitEthernet1/2 ACL: --- Address group: ---...
Basic IP forwarding on the device Upon receiving a packet, the device uses the destination IP address of the packet to find a match from the forwarding information base (FIB) table, and then uses the matching entry to forward the packet. FIB table A device selects optimal routes from the routing table, and puts them into the FIB table.
5600). slot-number ] Display fast forwarding table information about display ip fast-forwarding fragcache [ ip-address ] fragmented packets (MSR 2600/MSR 3600). Display fast forwarding table information about display ip fast-forwarding fragcache [ ip-address ] fragmented packets (MSR 5600). [ slot slot-number ] Display the aging time of fast forwarding entries.
Fast forwarding configuration example Network requirements Enable fast forwarding on Router B. Figure 63 Network diagram Eth1/1 Eth1/1 Eth1/2 Eth1/2 11.1.1.1/8 11.1.1.2/8 22.1.1.1/8 22.1.1.2/8 Router B Router C Router A Configuration procedure Configure Router A: # Configure the IP address of interface Ethernet 1/1. <RouterA>...
Verifying the configuration # Display the fast forwarding table on Router B. [RouterB] display ip fast-forwarding cache No fast-forwarding entries. The output shows that no fast forwarding entry exists. # Ping the IP address of Ethernet 1/2 of Router C from Router A. Reply packets can be received. [RouterA] ping 22.1.1.2 PING 22.1.1.2: 56 data bytes, press CTRL_C to break...
Displaying the adjacency table The adjacency table stores information about directly connected neighbors for IP forwarding. The neighbor information in the adjacency table in this chapter refers to non-Ethernet neighbor information. This table is not user configurable. The neighbor information is generated, updated, and deleted by link layer protocols through negotiation (such as PPP dynamic negotiation) or through manual configuration (such as ATM static configuration).
Optimizing IP performance A customized configuration can help optimize overall IP performance. This chapter describes various techniques you can use to customize your installation. Enabling an interface to receive and forward directed broadcasts destined for the directly connected network A directed broadcast packet is destined for all hosts on a specific network. In the destination IP address of the directed broadcast, the network ID identifies the target network, and the host ID is made up of all ones.
Configuration example Network requirements As shown in Figure 64, the default gateway of the host is the IP address 1.1.1.2/24 of the interface Ethernet 1/1 of Router A. Configure a static route destined for the host on Router B. Router B can receive directed broadcasts from the host to IP address 2.2.2.255.
To configure an MTU for an interface: Step Command Remarks Enter system view. system-view interface interface-type Enter interface view. interface-number Configure an MTU for the ip mtu mtu-size By default, no MTU is configured. interface. Configuring TCP MSS for an interface The maximum segment size (MSS) option informs the receiver of the largest segment that the sender can accept.
Upon receiving the ICMP message, the TCP source device calculates the current path MTU of the TCP connection. The TCP source device sends subsequent TCP segments that each are smaller than the MSS (MSS = path MTU – IP header length – TCP header length). If the TCP source device still receives ICMP error messages when the MSS is smaller than 32 bytes, the TCP source device will fragment packets.
To enable TCP SYN Cookie: Step Command Remarks Enter system view. system-view Enable SYN Cookie. tcp syn-cookie enable The default setting is disabled. Configuring the TCP buffer size Step Command Remarks Enter system view. system-view Configure the size of TCP receive/send tcp window window-size The default buffer size is 64 KB.
Page 181
The selected route is not created or modified by any ICMP redirect packet. The selected route is not destined for 0.0.0.0. There is no source route option in the received packet. ICMP redirect packets simplify host management and enable hosts to gradually optimize their routing table.
Sending ICMP error packets facilitates network management, but sending excessive ICMP packets increases network traffic. A device's performance degrades if it receives a lot of malicious ICMP packets that cause it to respond with ICMP error packets. To prevent such problems, you can disable the device from sending ICMP error packets. A device disabled from sending ICMP time-exceeded packets does not send ICMP TTL Expired packets but can still send ICMP Fragment Reassembly Timeout packets.
Configuring IP virtual fragment reassembly To make sure fragments arrive at a service module in order, the IP virtual fragment reassembly feature virtually reassembles the fragments of a datagram through sequencing and caching. The IP virtual fragment reassembly feature also prevents some service modules (such as IPsec, NAT, and firewall) from processing packet fragments that do not arrive in order.
Execute display commands in any view and reset commands in user view. Task Command Display brief information about RawIP connections display rawip (MSR 2600/MSR 3600). Display brief information about RawIP connections display rawip [ slot slot-number ] (MSR 5600). Display detailed information about RawIP connections display rawip verbose [ pcb pcb-index ] (MSR 2600/MSR 3600).
Page 185
Display detailed information about UDP connections display udp verbose [ slot slot-number [ pcb (MSR 5600). pcb-index ] ] Display IP packet statistics (MSR 2600/MSR 3600). display ip statistics Display IP packet statistics (MSR 5600). display ip statistics [ slot slot-number ]...
Configuring UDP helper Overview UDP helper enables a device to convert received UDP broadcast packets into unicast packets and forward them to a specific server. UDP helper is suitable for the scenario where hosts cannot obtain configuration information or device names by broadcasting packets because the target server or host resides on another broadcast domain.
Displaying and maintaining UDP helper Execute display command in any view and reset command in user view. Task Command Display information about packets forwarded display udp-helper interface interface-type interface-number by UDP helper. Clear UDP helper statistics. reset udp-helper statistics UDP helper configuration example Network requirements As shown in Figure...
Verifying the configuration # Display information about UDP packets forwarded by UDP helper on the interface Ethernet 1/1. [RouterA-Ethernet1/1] display udp-helper interface ethernet 1/1 Interface Server address Packets sent Ethernet1/1 10.2.1.1...
Configuring basic IPv6 settings Overview IPv6, also called IP next generation (IPng), was designed by the IETF as the successor to IPv4. One significant difference between IPv6 and IPv4 is that IPv6 increases the IP address size from 32 bits to 128 bits.
Stateful address autoconfiguration enables a host to acquire an IPv6 address and other • configuration information from a server (for example, a DHCPv6 server). For more information about DHCPv6 server, see "Configuring DHCPv6 server." • Stateless address autoconfiguration enables a host to automatically generate an IPv6 address and other configuration information by using its link-layer address and the prefix information advertised by a router.
Page 191
An IPv6 address consists of an address prefix and an interface ID, which are equivalent to the network ID and the host ID of an IPv4 address. An IPv6 address prefix is written in IPv6-address/prefix-length notation, where the prefix-length is a decimal number indicating how many leftmost bits of the IPv6 address includes the address prefix.
IPv6 ND protocol The IPv6 Neighbor Discovery (ND) protocol uses the following ICMPv6 messages: Table 8 ICMPv6 messages used by ND ICMPv6 message Type Function Acquires the link-layer address of a neighbor. Neighbor Solicitation (NS) Verifies whether a neighbor is reachable. Detects duplicate addresses.
Page 194
Neighbor reachability detection After Host A acquires the link-layer address of its neighbor Host B, Host A can use NS and NA messages to test reachability of Host B as follows: Host A sends an NS message whose destination address is the IPv6 address of Host B. If Host A receives an NA message from Host B, Host A decides that Host B is reachable.
Redirection Upon receiving a packet from a host, the gateway sends an ICMPv6 Redirect message to inform a better next hop to the host when the following conditions are met (similar to the ICMP redirection function in IPv4): • The interface receiving the packet is the same as the interface forwarding the packet. The selected route is not created or modified by an ICMPv6 Redirect message.
both IPv4 and IPv6 packets. An application that supports both IPv4 and IPv6 prefers IPv6 at the network layer. Dual stack is suitable for communication between IPv4 nodes or between IPv6 nodes. It is the basis of all transition technologies. However, it does not solve the IPv4 address depletion issue because each dual stack node must have a globally unique IPv4 address.
RFC 2460, Internet Protocol, Version 6 (IPv6) Specification • • RFC 2463, Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification RFC 2464, Transmission of IPv6 Packets over Ethernet Networks • RFC 2526, Reserved IPv6 Subnet Anycast Addresses •...
Assigning IPv6 addresses to interfaces This section describes how to configure an IPv6 global unicast address, an IPv6 link-local address, and an IPv6 anycast address. Configuring an IPv6 global unicast address Use one of the following methods to configure an IPv6 global unicast address for an interface: EUI-64 IPv6 address—The IPv6 address prefix of the interface is manually configured, and the •...
Page 199
Step Command Remarks Enter system view. system-view interface interface-type Enter interface view. interface-number By default, no IPv6 global unicast address is configured on an interface. Using the undo ipv6 address auto Enable stateless address ipv6 address auto command on an interface removes all autoconfiguration.
Step Command Remarks Enable the system to By default, the system does not preferably use the temporary preferably use the temporary ipv6 prefer temporary-address IPv6 address as the source IPv6 address as the source address of the packet. address of the packet. To generate a temporary address, an interface must be enabled with stateless address autoconfiguration.
Step Command Remarks By default, no link-local address is configured on an interface. Manually specify an IPv6 ipv6 address ipv6-address link-local address for the After an IPv6 global unicast address is link-local interface. configured on the interface, a link-local address is generated automatically. After you configure an IPv6 global unicast address for an interface, the interface automatically generates a link-local address.
If you use Method 2, make sure the corresponding VLAN interface exists and the Layer 2 port specified by port-type port-number belongs to the VLAN specified by vlan-id. The device associates the VLAN interface with the neighbor IPv6 address to identify the static neighbor entry. To configure a static neighbor entry: Step Command...
Minimizing link-local ND entries Perform this task to minimize link-local ND entries assigned to the driver. Link-local ND entries refer to ND entries comprising link-local addresses. By default, the device assigns all ND entries to the driver. With this feature enabled, the device does not add newly learned link-local ND entries whose link local addresses are not the next hop of any route into the driver to save driver resources.
Page 204
Parameter Description Determines whether a host uses stateful autoconfiguration to obtain an IPv6 address. If the M flag is set to 1, the host uses stateful autoconfiguration (for example, from a M flag DHCPv6 server) to obtain an IPv6 address. Otherwise, the host uses stateless autoconfiguration to generate an IPv6 address according to its link-layer address and the prefix information in the RA message.
Page 205
Configuring parameters for RA messages Step Command Remarks Enter system view. system-view interface interface-type Enter interface view. interface-number By default, no prefix information is configured for RA messages, and the IPv6 address of the interface sending RA messages is used as the prefix ipv6 nd ra prefix { ipv6-prefix information.
Configuring the maximum number of attempts to send an NS message for DAD An interface sends an NS message for DAD after obtaining an IPv6 address. If the interface does not receive a response within the time specified by the ipv6 nd ns retrans-timer command, it sends an NS message again.
Page 207
Figure 74 Application environment of local ND proxy Because Host A's IPv6 address is on the same subnet as Host B's, Host A directly sends an NS message to obtain Host B's MAC address. However, Host B cannot receive the NS message because they are isolated at Layer 2.
Configuring path MTU discovery Configuring the interface MTU IPv6 routers do not support packet fragmentation. If the size of a packet exceeds the MTU of the output interface, the router discards the packet and sends a Packet Too Big message to the source host. The source host fragments the packet according to the MTU.
Step Command Remarks Configure the aging time for ipv6 pathmtu age age-time The default setting is 10 minutes. dynamic path MTUs. Controlling sending ICMPv6 packets This section describes how to configure ICMPv6 packet sending. Configuring the rate limit for ICMPv6 error messages To avoid sending excessive ICMPv6 error messages within a short period that might cause network congestion, you can limit the rate at which ICMPv6 error messages are sent.
If a packet does not match any route, the device sends a No Route to Destination ICMPv6 error • message to the source. If the device fails to forward the packet because of administrative prohibition (such as a firewall filter •...
The interface receiving the packet is the interface forwarding the packet. • • The selected route is not created or modified by any ICMPv6 redirect message. The selected route is not a default route. • The forwarded packet does not contain the routing extension header. •...
Page 212
Display the total number of neighbor display ipv6 neighbors { all | dynamic | interface interface-type entries (MSR 2600/MSR 3600). interface-number | static | vlan vlan-id } count display ipv6 neighbors { { all | dynamic | static } [ slot...
Figure 75 Network diagram Host Router A Router B Eth1/2 Eth1/1 Eth1/1 2001::1/64 3001::1/64 3001::2/64 Configuration procedure Configure Router A: # Configure a global unicast address for interface Ethernet 1/1. <RouterA> system-view [RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] ipv6 address 3001::1/64 [RouterA-Ethernet1/1] quit # Configure a global unicast address for interface Ethernet 1/2 and enable it to advertise RA messages (an interface does not advertises RA messages by default).
Page 215
IPv6 is enabled, link-local address is FE80::20F:E2FF:FE00:2 Global unicast address(es): 3001::1, subnet is 3001::/64 Joined group address(es): FF02::1 FF02::2 FF02::1:FF00:1 FF02::1:FF00:2 MTU is 1500 bytes ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds ND retransmit interval is 1000 milliseconds Hosts use stateless autoconfig for addresses IPv6 Packet statistics:...
Page 216
FF02::2 FF02::1:FF00:1 FF02::1:FF00:1C0 MTU is 1500 bytes ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds ND retransmit interval is 1000 milliseconds ND advertised reachable time is 0 milliseconds ND advertised retransmit interval is 0 milliseconds ND router advertisements are sent every 600 seconds ND router advertisements live for 1800 seconds Hosts use stateless autoconfig for addresses...
Page 217
FF02::1:FF00:1 FF02::1:FF00:1234 MTU is 1500 bytes ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds ND retransmit interval is 1000 milliseconds Hosts use stateless autoconfig for addresses IPv6 Packet statistics: InReceives: InTooShorts: InTruncatedPkts: InHopLimitExceeds: InBadHeaders: InBadOptions: ReasmReqds:...
56 bytes from 2001::15B:E0EA:3524:E791, icmp_seq=0 hlim=64 time=5.404 ms --- Ping6 statistics for 2001::15B:E0EA:3524:E791 --- 1 packet(s) transmitted, 1 packet(s) received, 0.0% packet loss round-trip min/avg/max/std-dev = 5.404/5.404/5.404/0.000 ms The output shows that Router B can ping Router A and the host. The host can also ping Router B and Router A (output not shown).
DHCPv6 overview DHCPv6 provides a framework to assign IPv6 prefixes, IPv6 addresses, and other configuration parameters to hosts. DHCPv6 address/prefix assignment An address/prefix assignment process involves two or four messages. Rapid assignment involving two messages As shown in Figure 76, rapid assignment operates in the following steps: The DHCPv6 client sends a Solicit message that contains a Rapid Commit option to prefer rapid assignment.
Figure 77 Assignment involving four messages Address/prefix lease renewal An IPv6 address/prefix assigned by a DHCPv6 server has a valid lifetime. After the valid lifetime expires, the DHCPv6 client cannot use the IPv6 address/prefix. To use the IPv6 address/prefix, the DHCPv6 client must renew the lease time.
Stateless DHCPv6 Stateless DHCPv6 enables a device that has obtained an IPv6 address/prefix to get other configuration parameters from a DHCPv6 server. The device decides whether to perform stateless DHCP according to the managed address configuration flag (M flag) and the other stateful configuration flag (O flag) in the RA message received from the router during stateless address autoconfiguration.
Configuring the DHCPv6 server Overview A DHCPv6 server can assign IPv6 addresses or IPv6 prefixes to DHCPv6 clients. IPv6 address assignment As shown in Figure 81, the DHCPv6 server assigns IPv6 addresses, domain name suffixes, DNS server addresses, and other configuration parameters to DHCPv6 clients. The IPv6 addresses assigned to the clients include the following types: •...
Figure 82 IPv6 prefix assignment Concepts Multicast addresses used by DHCPv6 DHCPv6 uses the multicast address FF05::1:3 to identify all site-local DHCPv6 servers, and uses the multicast address FF02::1:2 to identify all link-local DHCPv6 servers and relay agents. DUID A DHCP unique identifier (DUID) uniquely identifies a DHCPv6 device (DHCPv6 client, server, or relay agent).
The DHCPv6 server creates a prefix delegation (PD) for each assigned prefix to record the IPv6 prefix, client DUID, IAID, valid lifetime, preferred lifetime, lease expiration time, and IPv6 address of the requesting client. DHCPv6 address pool The DHCP server selects IPv6 addresses, IPv6 prefixes, and other parameters from an address pool, and assigns them to the DHCP clients.
client against the subnets of all address pools, and selects the address pool with the longest-matching subnet. To avoid wrong address allocation, keep the subnet used for dynamic assignment consistent with the subnet where the interface of the DHCPv6 server or DHCPv6 relay agent resides. IPv6 address/prefix allocation sequence The DHCPv6 server selects an IPv6 address/prefix for a client in the following sequence: IPv6 address/prefix statically bound to the client's DUID and IAID and expected by the client.
Configuration guidelines An IPv6 prefix can be bound to only one DHCPv6 client. You cannot modify bindings that have • been created. To change the binding for a DHCPv6 client, you must delete the existing binding first. • Only one prefix pool can be applied to an address pool. You cannot modify prefix pools that have been applied.
Configuring IPv6 address assignment Use one of the following methods to configure IPv6 address assignment: • Configure a static IPv6 address binding in an address pool: If you bind a DUID and an IAID to an IPv6 address, the DUID and IAID in a request must match those in the binding before the DHCPv6 server can assign the IPv6 address to the requesting client.
Step Command Remarks By default, all IPv6 addresses except for the DHCPv6 server's IP address in a DHCPv6 address pool are assignable. (Optional.) Specify the IPv6 ipv6 dhcp server forbidden-address addresses excluded from start-ipv6-address If the excluded IPv6 address is in dynamic assignment.
Step Command Remarks network prefix/prefix-length Specify an IPv6 subnet for By default, no IPv6 subnet is [ preferred-lifetime preferred-lifetime dynamic assignment. specified. valid-lifetime valid-lifetime ] (Optional.) Specify a DNS By default, no DNS server dns-server ipv6-address server address. address is specified. (Optional.) Specify a domain By default, no domain name domain-name domain-name...
Step Command Remarks Enter interface view. interface interface-type interface-number By default, the interface discards Enable the DHCPv6 ipv6 dhcp select server DHCPv6 packets from DHCPv6 server on the interface. clients. • Configure global address assignment: ipv6 dhcp server { allow-hint | preference preference-value | Use one of the commands.
Task Command Display information about IPv6 address display ipv6 dhcp server ip-in-use [ address ipv6-address | pool bindings. pool-name ] Display information about IPv6 prefix display ipv6 dhcp server pd-in-use [ pool pool-name | prefix bindings. prefix/prefix-len ] Display packet statistics on the DHCPv6 display ipv6 dhcp server statistics [ pool pool-name ] server.
Page 232
Configuration procedure # Specify an IPv6 address for Ethernet 1/1. <Router> system-view [Router] interface ethernet 1/1 [Router-Ethernet1/1] ipv6 address 1::1/64 [Router-Ethernet1/1] quit # Create prefix pool 1, and specify the prefix 2001:0410::/32 with assigned prefix length 48. [Router] ipv6 dhcp prefix-pool 1 prefix 2001:0410::/32 assign-len 48 # Create address pool 1.
Prefix pool: 1 Preferred lifetime 86400, valid lifetime 259200 Static bindings: DUID: 00030001ca0006a4 IAID: Not configured Prefix: 2001:410:201::/48 Preferred lifetime 86400, valid lifetime 259200 DNS server addresses: 2:2::3 Domain name: aaa.com SIP server addresses: 2:2::4 SIP server domain names: bbb.com # Display information about prefix pool 1.
Page 234
Figure 85 Network diagram Configuration procedure Specify IPv6 addresses for interfaces on the DHCPv6 server. (Details not shown.) Enable DHCPv6: # Enable the DHCPv6 server on the interfaces Ethernet 1/1 and Ethernet 1/2. <RouterA> system-view [RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] ipv6 dhcp select server [RouterA-Ethernet1/1] quit [RouterA] interface ethernet 1/2 [RouterA-Ethernet1/2] ipv6 dhcp select server...
Page 235
Verifying the configuration After the preceding configuration, clients in subnets 1::1:0:0:0/96 and 1::2:0:0:0/96 can obtain IPv6 addresses and other configuration parameters from the DHCPv6 server (Router A). You can use the display ipv6 dhcp server ip-in-use command to display IPv6 addresses assigned to the clients.
Configuring the DHCPv6 relay agent A DHCPv6 client usually uses a multicast address to contact the DHCPv6 server on the local link to obtain an IPv6 address and other configuration parameters. As shown in Figure 86, if the DHCPv6 server resides on another subnet, the DHCPv6 clients need a DHCPv6 relay agent to contact the server.
Figure 87 Operating process of a DHCPv6 relay agent DHCPv6 client DHCPv6 relay agent DHCPv6 server Solicit (contains a Rapid Commit option) (2) Relay-forward (3) Relay-reply (4) Reply Configuration guidelines You can use the ipv6 dhcp relay server-address command to specify a maximum of eight DHCPv6 •...
Displaying and maintaining the DHCPv6 relay agent Execute display commands in any view and reset commands in user view. Task Command Display the DUID of the local device. display ipv6 dhcp duid Display DHCPv6 server addresses display ipv6 dhcp relay server-address [ interface interface-type specified on the DHCPv6 relay agent.
[RouterA] interface ethernet 1/2 [RouterA-Ethernet1/2] ipv6 address 2::1 64 [RouterA-Ethernet1/2] quit [RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] ipv6 address 1::1 64 # Enable the DHCPv6 relay agent on Ethernet 1/1 and specify the DHCPv6 server on the relay agent. [RouterA-Ethernet1/1] ipv6 dhcp select relay [RouterA-Ethernet1/1] ipv6 dhcp relay server-address 2::2 Configure Router A as the gateway, enable Router A to send RA messages, and turn on the M and O flags.
Configuring DHCPv6 snooping NOTE: The feature is not supported. DHCPv6 snooping works between the DHCPv6 client and server, or between the DHCPv6 client and DHCPv6 relay agent. It guarantees that DHCPv6 clients obtain IP addresses from authorized DHCPv6 servers. Also, it records IP-to-MAC bindings of DHCPv6 clients (called DHCPv6 snooping entries) for security purposes.
Option 18, also called the interface-ID option, is used by the DHCPv6 relay agent to determine the interface to use to forward RELAY-REPLY message. In H3C implementation, the DHCPv6 snooping device adds Option 18 to the received DHCPv6 request message before forwarding it to the DHCPv6 server. The server then assigns IP address to the client based on the client information in Option 18.
Option 37, also called the remote-ID option, is used to identify the client. In H3C implementation, the DHCPv6 snooping device adds Option 37 to the received DHCPv6 request message before forwarding it to the DHCPv6 server. This option provides client information about address allocation.
Tasks at a glance (Optional.) Enabling DHCPv6-REQUEST check Configuring basic DHCPv6 snooping To make sure DHCPv6 clients can obtain valid IPv6 addresses, specify the ports connected to authorized DHCPv6 servers as trusted ports. The trusted ports and the ports connected to DHCPv6 clients must be in the same VLAN.
Step Command Remarks ipv6 dhcp snooping option By default, Option 37 is not Enable support for Option 37. remote-id enable supported. ipv6 dhcp snooping option By default, the DHCPv6 snooping • (Optional.) Specify the content remote-id [ vlan vlan-id ] string device uses its DUID as the content as the remote ID.
Setting the maximum number of DHCPv6 snooping entries Perform this task to prevent the system resources from being overused. To set the maximum number of DHCPv6 snooping entries: Step Command Remarks Enter system view. system-view interface interface-type Enter interface view. interface-number Set the maximum number By default, the number of DHCPv6...
Configuring IPv6 fast forwarding Overview Fast forwarding reduces route lookup time and improves packet forwarding efficiency by using a high-speed cache and data-flow-based technology. It identifies a data flow by using six fields: source IPv6 address, destination IPv6 address, source port number, destination port number, protocol number, and VPN instance name.
IPv6 fast forwarding configuration example Network requirements As shown in Figure 93, enable IPv6 fast forwarding on Router B. Figure 93 Network diagram Configuration procedure Configure Router A: # Specify the IPv6 address of interface Ethernet 1/1. <RouterA> system-view [RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] ipv6 address 2002::1 64 [RouterA-Ethernet1/1] quit # Configure a static route.
Page 250
[RouterB] display ipv6 fast-forwarding cache No IPv6 fast-forwarding entries. The output shows that no IPv6 fast forwarding entry exists. # Ping the IPv6 address of Ethernet 1/2 of Router C from Router A. Reply packets can be received. [RouterA] ping ipv6 2001::1 PING 2001::1 : 56 data bytes, press CTRL_C to break Reply from 2001::1...
Configuring tunneling Overview Tunneling is an encapsulation technology. One network protocol encapsulates packets of another network protocol and transfers them over a virtual point-to-point connection. The virtual connection is called a tunnel. Packets are encapsulated at the tunnel source end and de-encapsulated at the tunnel destination end.
Page 252
physical interface of the tunnel. In the IPv4 header, the source IPv4 address is the IPv4 address of the tunnel source, and the destination IPv4 address is the IPv4 address of the tunnel destination. Upon receiving the packet, Device B de-encapsulates the packet. If the destination address of the IPv6 packet is itself, Device B forwards it to the upper-layer protocol.
Page 253
Automatic IPv4-compatible IPv6 tunneling—A point-to-multipoint link. Both ends of the tunnel use • IPv4-compatible IPv6 addresses. The address format is 0:0:0:0:0:0:a.b.c.d/96, where a.b.c.d is the IPv4 address of the tunnel destination. This mechanism simplifies tunnel establishment. Automatic IPv4-compatible IPv6 tunnels have limitations because IPv4-compatible IPv6 addresses must use globally unique IPv4 addresses.
ISATAP tunnels are mainly used for communication between IPv6 routers or between an IPv6 host and an IPv6 router over an IPv4 network. Figure 96 Principle of ISATAP tunneling IPv4 over IPv4 tunneling IPv4 over IPv4 tunneling (RFC 1853) enables isolated IPv4 networks to communicate. For example, an IPv4 over IPv4 tunnel can connect isolated private IPv4 networks over a public IPv4 network.
IPv4 over IPv6 tunneling Implementation IPv4 over IPv6 tunneling adds an IPv6 header to IPv4 packets so that IPv4 packets can pass an IPv6 network through a tunnel to realize interworking between isolated IPv4 networks. Figure 98 IPv4 over IPv6 tunnel Packets traveling through a tunnel undergo encapsulation and de-encapsulation, as shown in Figure Encapsulation:...
Page 256
Dual Stack Lite (DS-Lite) is a combination of the tunneling and NAT technologies. NAT translates the private IPv4 addresses of the IPv4 hosts before the hosts reach the IPv4 public network. DS-Lite tunnel supports only an IPv4 host in a private network initiating communication with an IPv4 host on the Internet.
IPv6 over IPv6 tunneling IPv6 over IPv6 tunneling (RFC 2473) enables isolated IPv6 networks to communicate with each other over another IPv6 network. For example, two isolated IPv6 networks that do not want to show their addresses to the Internet can use an IPv6 over IPv6 tunnel to communicate with each other. Figure 101 Principle of IPv6 over IPv6 tunneling Figure 101 shows the encapsulation and de-encapsulation processes.
Tunneling configuration task list Tasks at a glance (Required.) Configuring a tunnel interface Perform one of the following tasks: • Configuring an IPv6 over IPv4 tunnel: Configuring an IPv6 over IPv4 manual tunnel Configuring an automatic IPv4-compatible IPv6 tunnel Configuring a 6to4 tunnel Configuring an ISATAP tunnel •...
Step Command Remarks The intended bandwidth for the tunnel interface affects the link cost Set the intended bandwidth bandwidth bandwidth-value value. For more information, see for the tunnel interface. Layer 3—IP Routing Configuration Guide. Set the ToS for tunneled The default setting is the same as the tunnel tos tos-value packets.
Step Command Remarks By default, no source address or source interface is configured for the tunnel interface. Configure a source address or source { ip-address | The specified source address or the source interface for the tunnel interface-type interface-number } primary IP address of the specified interface.
Page 262
[RouterA] interface ethernet 1/2 [RouterA-Ethernet1/2] ip address 192.168.100.1 255.255.255.0 [RouterA-Ethernet1/2] quit # Specify an IPv6 address for Ethernet 1/1. [RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] ipv6 address 3002::1 64 [RouterA-Ethernet1/1] quit # Configure an IPv6 over IPv4 manual tunnel interface tunnel 0. [RouterA] interface tunnel 0 mode ipv6-ipv4 # Specify an IPv6 address for the tunnel interface.
# Router B and Router A can ping the IPv6 address of Ethernet 1/1 of each other. For example, ping the IPv6 address of Ethernet 1/1 on Router B from Router A. [RouterA] ping ipv6 3003::1 Ping6(56 data bytes) 3001::1 --> 3003::1, press escape sequence to break 56 bytes from 3003::1, icmp_seq=0 hlim=64 time=45.000 ms 56 bytes from 3003::1, icmp_seq=1 hlim=64 time=10.000 ms 56 bytes from 3003::1, icmp_seq=2 hlim=64 time=4.000 ms...
Configuration example Network requirements As shown in Figure 103, dual-stack routers Router A and Router B communicate over an IPv4 network. Configure an automatic IPv4-compatible IPv6 tunnel between the two routers to enable IPv6 communications over the IPv4 network. Figure 103 Network diagram Configuration procedure Before configuring an automatic IPv4-compatible IPv6 tunnel, make sure Router A and Router B can reach each other through IPv4.
# Router B and Router A can ping the IPv4-compatible IPv6 address of each other. For example, ping the IPv4-compatible IPv6 address on Router B from Router A. [RouterA-Tunnel0] ping ipv6 ::192.168.50.1 Ping6(56 data bytes) ::192.168.100.1 --> ::192.168.50.1, press escape sequence to break 56 bytes from ::192.168.50.1, icmp_seq=0 hlim=64 time=17.000 ms 56 bytes from ::192.168.50.1, icmp_seq=1 hlim=64 time=9.000 ms 56 bytes from ::192.168.50.1, icmp_seq=2 hlim=64 time=11.000 ms...
Step Command Remarks (Optional.) Enable dropping of IPv6 packets tunnel discard The default setting is disabled. using IPv4-compatible ipv4-compatible-packet IPv6 addresses. 6to4 tunnel configuration example Network requirements As shown in Figure 104, configure a 6to4 tunnel between 6to4 routers Router A and Router B so Host A and Host B can reach each other over the IPv4 network.
Page 267
[RouterB] interface tunnel 0 mode ipv6-ipv4 6to4 # Specify an IPv6 address for the tunnel interface. [RouterA-Tunnel0] ipv6 address 3001::1/64 # Specify the source interface as Ethernet1/2 for the tunnel interface. [RouterA-Tunnel0] source ethernet 1/2 [RouterA-Tunnel0] quit # Configure a static route destined for 2002::/16 through the tunnel interface. [RouterA] ipv6 route-static 2002:: 16 tunnel 0 Configure Router B: •...
6to4 relay configuration example Network requirements As shown in Figure 105, Router A is a 6to4 router, and 6to4 addresses are used on the connected IPv6 network. Router B serves as a 6to4 relay router and is connected to an IPv6 network (2001::/16). Configure a 6to4 tunnel between Router A and Router B to make Host A and Host B reachable to each other.
[RouterA] ipv6 route-static 2002:0601:0101:: 64 tunnel 0 # Configure a default route to reach the IPv6 network, which specifies the next hop as the 6to4 address of the relay router. [RouterA] ipv6 route-static :: 0 2002:0601:0101::1 Configure Router B: • # Specify an IPv4 address for Ethernet 1/2.
Because automatic tunnels do not support dynamic routing, configure a static route destined for the • destination IPv6 network at each tunnel end. You can specify the local tunnel interface as the egress interface of the route or specify the IPv6 address of the peer tunnel interface as the next hop of the route.
Page 271
Configuration procedure Configure the router: • # Specify an IPv6 address for Ethernet1/2. <Router> system-view [Router] interface ethernet 1/2 [Router-Ethernet1/2] ipv6 address 3001::1/64 [Router-Ethernet1/2] quit # Specify an IPv4 address for Ethernet1/1. [Router] interface ethernet 1/1 [Router-Ethernet1/1] ip address 1.1.1.1 255.0.0.0 [Router-Ethernet1/1] quit # Create an ISATAP tunnel interface tunnel 0.
Page 272
# Display information about the ISATAP interface. C:\>ipv6 if 2 Interface 2: Automatic Tunneling Pseudo-Interface Guid {48FCE3FC-EC30-E50E-F1A7-71172AEEE3AE} does not use Neighbor Discovery uses Router Discovery routing preference 1 EUI-64 embedded IPv4 address: 1.1.1.2 router link-layer address: 1.1.1.1 preferred global 2001::5efe:1.1.1.2, life 29d23h59m46s/6d23h59m46s (public) preferred link-local fe80::5efe:1.1.1.2, life infinite link MTU 1500 (true link MTU 65515) current hop limit 255...
Configuring an IPv4 over IPv4 tunnel Follow these guidelines when you configure an IPv4 over IPv4 tunnel: • The destination address specified for the local tunnel interface must be the source address specified for the peer tunnel interface, and vice versa. The source/destination addresses of local tunnels of the same tunnel mode cannot be the same.
Configuration example Network requirements As shown in Figure 107, the two subnets Group 1 and Group 2 use private IPv4 addresses. Configure an IPv4 over IPv4 tunnel between Router A and Router B to make the two subnets reachable to each other. Figure 107 Network diagram Configuration procedure Make sure Router A and Router B can reach each other through IPv4.
[RouterB-Ethernet1/1] quit # Specify an IPv4 address for Serial 2/1, which is the physical interface of the tunnel. [RouterB] interface serial 2/1 [RouterB-Serial2/1] ip address 3.1.1.1 255.255.255.0 [RouterB-Serial2/1] quit # Create an IPv4 over IPv4 tunnel interface tunnel 2. [RouterB] interface tunnel 2 mode ipv4-ipv4 # Specify an IPv4 address for the tunnel interface.
To configure an IPv4 over IPv6 manual tunnel: Step Command Remarks Enter system view. system-view Enter tunnel interface interface tunnel number [ mode view. ipv6 ] Configure an IPv4 ip address ip-address { mask | By default, no IPv4 address is configured address for the tunnel mask-length } [ sub ] for the tunnel interface.
Page 277
# Specify an IPv6 address for Serial 2/0, which is the physical interface of the tunnel. [RouterA] interface serial 2/0 [RouterA-Serial2/0] ipv6 address 2001::1:1 64 [RouterA-Serial2/0] quit # Create an IPv6 tunnel interface tunnel 1. [RouterA] interface tunnel 1 mode ipv6 # Specify an IPv4 address for the tunnel interface.
Ping 30.1.3.1 (30.1.3.1) from 30.1.1.1: 56 data bytes, press escape sequence to break 56 bytes from 30.1.3.1: icmp_seq=0 ttl=255 time=3.000 ms 56 bytes from 30.1.3.1: icmp_seq=1 ttl=255 time=1.000 ms 56 bytes from 30.1.3.1: icmp_seq=2 ttl=255 time=0.000 ms 56 bytes from 30.1.3.1: icmp_seq=3 ttl=255 time=1.000 ms 56 bytes from 30.1.3.1: icmp_seq=4 ttl=255 time=1.000 ms --- Ping statistics for 30.1.3.1 --- 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss...
Step Command Remarks By default, no source address or interface is specified for the tunnel. If you specify a source address, it is used Specify the source address source { ipv6-address | as the source address of the encapsulated or source interface for the interface-type IPv6 packets.
Page 280
[RouterA-Ethernet1/2] ipv6 address 1::1 64 [RouterA-Ethernet1/2] quit # Create an IPv6 tunnel interface tunnel1. [RouterA] interface tunnel 1 mode ipv6 # Specify an IPv4 address for the tunnel interface. [RouterA-Tunnel1] ip address 30.1.2.1 255.255.255.0 # Specify the IP address of Ethernet 1/2 as the source address for the tunnel interface. [RouterA-Tunnel1] source 1::1 # Specify IP address of Ethernet 1/2 on Router B as the destination address for the tunnel interface.
Pinging 20.1.1.2 with 32 bytes of data: Reply from 20.1.1.2: bytes=32 time=51ms TTL=255 Reply from 20.1.1.2: bytes=32 time=44ms TTL=255 Reply from 20.1.1.2: bytes=32 time=1ms TTL=255 Reply from 20.1.1.2: bytes=32 time=1ms TTL=255 Ping statistics for 20.1.1.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 1ms, Maximum = 51ms, Average = 24ms Configuring an IPv6 over IPv6 tunnel...
Step Command Remarks By default, no destination address is configured for the tunnel. Configure the destination The tunnel destination address address for the tunnel destination ipv6-address must be the IPv6 address of the interface. receiving interface on the tunnel peer. It is used as the destination IPv6 address of tunneled packets.
Page 283
# Create an IPv6 tunnel interface tunnel 1. [RouterA] interface tunnel 1 mode ipv6 # Specify an IPv6 address for the tunnel interface. [RouterA-Tunnel1] ipv6 address 3001::1:1 64 # Specify the IP address of Serial 2/0 as the source address for the tunnel interface. [RouterA-Tunnel1] source 2001::11:1 # Specify the IP address of Serial 2/1 on Router B as the destination address for the tunnel interface.
56 bytes from 2002:3::1, icmp_seq=4 hlim=64 time=0.000 ms --- Ping6 statistics for 2002:3::1 --- 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.000/0.000/0.000/0.000 ms Displaying and maintaining tunneling configuration Execute display commands in any view and reset commands in user view. Task Command display interface [ tunnel ] [ brief [ down ] ]...
Configuring flow classification The following matrix shows the feature and router compatibility: Feature MSR 2600 MSR 3600 MSR 5600 Flow classification To implement differentiated services, flow classification categorizes packets to be forwarded by a multi-core device according to one of the following flow classification policies: •...
Index A B C D E F H I N O P S T U Configuring an ISATAP tunnel,254 Configuring basic DHCP snooping,71 Address/prefix lease renewal,205 Configuring basic DHCPv6 snooping,228 Applying an address pool on an interface,45 Configuring DHCP packet rate limit,75 Applying the DDNS policy to an interface,107...
Page 287
Displaying and maintaining DHCPv6 snooping,231 table,154 Displaying and maintaining fast forwarding,156 Displaying and maintaining IP addressing,22 H3C implementation of Option 18 and Option 37,226 Displaying and maintaining IP performance optimization,169 Displaying and maintaining IPv4 DNS,90 IP address configuration example,23...
Page 288
Setting the DSCP value for DHCP packets sent by the DHCP server,47 Obtaining an IP address dynamically,79 Setting the DSCP value for DHCPv6 packets sent by the Overview,8 DHCPv6 server,215 Overview,104 Setting the maximum number of DHCPv6 snooping Overview,69 entries,230 Overview,81 Setting the maximum number of dynamic ARP entries Overview,33...
Need help?
Do you have a question about the MSR 2600 and is the answer not in the manual?
Questions and answers