chenyi852 / chenyi852.github.com

It's my first blog
Apache License 2.0
0 stars 0 forks source link

ubuntu network configuration #13

Open chenyi852 opened 4 years ago

chenyi852 commented 4 years ago
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
        address 10.204.62.80
        netmask 255.255.254.0
        gateway 10.204.62.1
        dns-nameservers 10.125.30.25
        dns-nameservers 10.127.4.25
        dns-nameservers 10.72.255.100

auto br0
iface br0 inet static
        address 192.168.1.1
        netmask 255.255.255.0

        pre-up brctl addbr br0
        pre-up tunctl -u chenyi -g chenyi -t tap0
        pre-up ifconfig tap0 0.0.0.0 up
        pre-up brctl addif br0 tap0

#pre-up tunctl -u chenyi -g chenyi -t tap1
#        pre-up ifconfig tap1 0.0.0.0 up
#        pre-up brctl addif br0 tap1

        post-down brctl delif br0 tap0
        post-down tunctl -d tap0

#       post-down brctl delif br0 tap1
#        post-down tunctl -d tap1

        post-down brctl delbr br0