Configure IP6 in Linux

Source: Internet
Author: User
In Linux, configure IP6-Linux Enterprise Application-Linux server application information. For more information, see. I installed an SUSE last time. Today, I have to configure IP6. Not afraid. What do I fear if I have a powerful search engine?

First, add the IPv6 module:

Log On As root and enter:

# Insmod ipv6 (add module)

No such file or directory is returned. I was surprised. Enter lsmod immediately (view the module list). The result is available. No wonder ~~~~

Next, add an address for the network adapter eth0:

# Ifconfig eth0 add 2001: 0: 0: 50: 1/64
Then, modify the file so that it can automatically start ipv6 after restarting the machine:

# Vi/etc/rc. local
Add the following two rows:
Ifconfig eth0 add 2001: 0: 0: 50: 1/64 # ipv6 address
Route-A inet6 add default gw 2001: 0: 0: 50: 1 # ipv6 Gateway
# Vi/etc/sysconfig/network


Add the following line
NETWORKING_IPV6 = yes
Added and tested:
# Ping6 2001: 0: 0: 50: 1 ------------- gateway address
The result is as follows:
PING 2001: 250: 1800: 1: 1 (2001: 250: 1800: 1: 1) 56 data bytes
64 bytes from 2001: 250: 1800: 1: 1: icmp_seq = 1 ttl = 64 time = 0.082 MS
64 bytes from 2001: 250: 1800: 1: 1: icmp_seq = 2 ttl = 64 time = 0.058 MS

Then, you must start the route forwarding function of Linux. I only need two IPV6 addresses. Do I need two NICs? But when I use

Ifconfig eth1 add 2001: 0: 0: 51: 1, it says No such device. Therefore, there is only one Nic, so use ifconfig eth0 add 2001: 0: 0: 51: 1/64 again, so that two IPV6 addresses are added to one Nic.

I don't understand what the senior guy said about configuring this Linux as a route forwarder. It turns out that the route forwarding function of Linux is enabled.

Open/etc/sysctl. conf and change net. ipv4.ip _ forward = 0 to 1.

Next, let's talk about how to install and configure IPv6 on Windows. In fact, this is very simple:

1. Install IPv6: some say that the installation on XP is the same as that on Server 2003. Ipv6 install is a command prompt, But I have encountered a Server 2003, but it does not work. No problem on XP.

Uninstalling IPv6: ipv6 uninstall

2. View All ipv6 interface information:

IPv6 if displays information about all interfaces

IPv6 if 4 displays interface 4 Information

Note: Generally, after the IPv6 protocol stack is installed, there are four default network interfaces for one network adapter, interface 1 for the loopback interface, and interface 2 for the automatic tunnel Virtual interface, interface 3 is used for the 6to4 tunnel virtual interface, and interface 4 is used for the normal network connection interface, that is, the unicast interface of the IPv6 address. If there are multiple NICs, there are other interfaces.

3. Configure the ipv6 address for the specified interface:

IPv6 adu 4/3eff: 124e: 1 configure IPv6 address 3eff: 124e: 1 for the interface with index number 4

IPv6 adu 4/3eff: 124e: 1 life 0 Delete the IPv6 address just configured above

4. view route information:

IPv6? V rt: view all routes in the route table (manual routes and system routes) without adding-v. Only manually added routes can be viewed.

5. Add route information:

IPv6 rtu 2000: 3440:/64 4 Add a route for interface 4

IPv6 rtu 2000: 3440:/64 4 life 0 for interface 4 delete a route

IPv6 rtu:/0 4/3ffe: 124e: 2 Add a default route, the gateway is 3ffe: 345e: 2

IPv6 rtu 3ffe: 124e:/64 4 add prefix 64 for interface 4

6. display the global parameter value of IPv6 protocol

IPv6 gp displays the value of Global IPv6 parameters.

◆ IPv6 [-p] gpu DefaultCurHopLimit sets the value of the "Hop limit" field in the IPv6 data packet header. The default value is 128.

◆ IPv6 [-p] gpu UseAnonymousAddresses [yes | no | always | Counter] sets whether to use an anonymous address. Yes by default

◆ IPv6 [-p] gpu MaxAnonDADAttempts sets the number of times to check the uniqueness of anonymous addresses. Default Value: 5

◆ IPv6 [-p] gpu MaxAnonLifetime sets the valid and preferred survival time for anonymous addresses. The default validity period is 7 days. By default, the first choice is 1 day.

◆ IPv6 [-p] gpu AnonRegenerateTime Set the time period (in seconds)

◆ IPv6 [-p] gpu MaxAnonRandomTimeSet the maximum anonymous random time in minutes

◆ IPv6 [-p] gpu AnonRandomTimeSets the minimum anonymous random time in seconds. The default value is 0 seconds.

◆ IPv6 [-p] gpu NeighborCacheLimit Set the maximum number of projects for each interface in the neighboring high-speed cache. The default value is 8.

◆ IPv6 [-p] gpu RouteCacheLimit Set the maximum number of items for each interface in the route table. The default value is 32 items.

◆ IPv6 ppt display prefix policy table

Note: prefix policies are used to specify the policies used for source and target address selection.

You can also use the netsh command to perform the following operations:

A. You can set A fixed IPV6 address as follows:
C: \> netsh
Netsh> interface ipv6
Netsh interface ipv6> add address "Local Connection" fe80: a520: 1314: 1
/* Set a fixed IPv6 address. "Local Connection" refers to the name of a connection established on your machine */
Netsh interface ipv6> add dns "Local Connection" 2001: 251: e101: 0: 2
/* Set the IPv6 DNS address */

B. If you are in an IPV4 network, you need to connect to the IPV6 network through a tunnel. The peer user needs to work together to build a tunnel. The peer can be a routing (switching) device in the network center or another PC. In any case, the following information is required:
. Your IPV4 address that can be routed to the peer end is assumed to be 210.35.168.100
. IPV4 address of the Peer end, which is assumed to be 210.35.240.24
. The IPV6 address of the Peer end, which is assumed to be 2001: 250: 6C01: 1000: 1.
. The IPV6 address allocated to you by the peer end. Assume It is 2001: 250: 6C01: 1000: 2.
The local configuration is as follows:
Configuration tunnel: ipv6 ifcr v6v4 210.35.168.100 210.35.240.24
Configure ipv6 address for the Local Machine: ipv6 adu 4/2001: 250: 6c01: 100: 2
Note: The address of the 4th Interface ports is set to 2001: 250: 6c01: 100: 2. In this configuration, it is generally specified as the actual Interface number, if there is only one network card, it should be Interface 4. */
Configure the route for the Local Machine: ipv6 rtu:/0 4/2001: 250: 6c01: 100: 1

Add one method:

(1) install the IPv6 protocol stack: run the "install ipv6" command in CMD.
(2) IPv6 Address Setting: Execute netsh to enter the system network parameter setting environment, and then execute
Interface ipv6 add address "Local Connection" 2001: da8: 207: 9402
(3) IPv6 Default Gateway settings
Run
Interface ipv6 add route:/0 "Local Connection" 2001: da8: 207: 9401 publish = yes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.