IP command Docker related Network command Network namespace Related command summary

Source: Internet
Author: User
Network namespaces:

You can refer to this article in detail:
http://blog.csdn.net/guizaijianchic/article/details/78444638
Contains the use of IP netns
IP netns Add net1 create a new network space Common instructions: IP link

IP link Add

IP link Add type veth #添加veth pair, after creation remember up IP link set veth0 up
ex:ip link add vethfoo type Veth peer name vethbar< C4/>ip link Add br0 type bridge #添加网桥之后 IP link set dev br0 up to start

IP link Set

IP link set dev netns name puts DEV in the namespace of name
Ex:ip link set veth0 netns net0
IP link set dev up/down
IP l Ink Set dev name alias-name
ex:ip link set dev B name eth0

IP addr

    IP addr Displays all address
    IP addr Show         IP addr shows bridge0
    ip addr Add ip dev to dev Configure IP address
    IP addr Add 10.0.0.1/24 Dev veth0 Configure IP address
    IP addr del for veth pair

IP route
IP route add IP DEV brctl

Brctl delbr Docker0
brctl ADDBR Docker0
related operations of Veth pair and bridge

Veth pair:
New, add Ip,up, add route ()

Bridge
New, add Ip,up
If you need to remove the network bridge, close DOCKER,DOWN,DELBR first

Bridge

Delete:
sudo service docker stop
sudo ip link set dev docker0 down
sudo brctl delbr docker0
add:
sudo brctl  ADDBR bridge0
sudo ip addr add  192.168.5.1/24 dev bridge0
sudo ip link set bridge0 up
sudo ip addr Show BRIDGE0
sudo service docker start

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.