IPv6和高級網絡協議

#######IPv6#######
稱爲IPv4的下一代協議

爲方便操作, ipv6 被換算成 8x16 進制的一
串數字
– 2000:0000:0000:0000:0000:0000:0000:0001
– 2000:0:0:0:0:0:0:1
• 任意位數的 0 可以用 :: 來表示
– 2000:0000:0000:0000:0000:0000:0000:0001
– 2000::1

ping6 2001:db8:0:1::1
• tracepath6 2001:db8:0:2::451
• netstat -46n
– n
– t
– u
– L
– a
– p
不作解析
tcp 協議
udp 協議
狀態位 listen 的端口
所有端口
顯示進程


nmcli connection add con-name eth0
ifname eth0 type ethernet ip6 2014::1 gw6
2014::5
– ip addr show
– ip -6 route
#######高級網絡設置##########
##bridge##
首先把真機裏面的ifcfg-br0  ifcfg-enp0s25移到/mnt下面再開始做實驗
nm-con***
把以太網和橋接刪掉
然後編輯文件
ifcfg-enp0s25
DEVICE=enp0s25                
ONBOOT=yes
BOOTPROTO=none
BRIDGE=br0                ##網橋

vim ifcfg-br0
DEVICE=br0
ONBOOT=yes
BOOTPROTO=none
TYPE=Bridge                ##類型B大寫
IPADDR=172.25.254.39
PREFIX=24
DNS1=172.25.254.250

systemctl stop NetworkManager.service
systemctl restart network
systemctl start NetworkManager


#######對網橋的管理######
nm-co***        ##先刪除網卡
brctl addbr br0        ##添加網橋
brctl show        ##顯示網橋
brctl addif br0 eth0    ##把br0搭在eth0上面
ifconfig br0 172.25.254.139netmask 255.255.255.0    ##對網橋進行配置
ping 172.25.254.250        ##可以ping通
brctl delif br0 eth0        ##把br0從eth0上面移除
然後ping 172.25.254.250
ifconfig br0 down           ##把br0ifconfig中移除
brctl delbr br0            ##刪除網橋

#######bonding#######
如果有一塊網卡壞掉的時候該怎麼辦,現在有網卡的bonding技術

首先需要兩塊網卡,我們在虛擬機裏面添加一塊網卡
然後我們開始搭建bond
nmcli connetction add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.139/24        ##添加bond名字爲bond0
然後我們打開兩個shell 一個監控bond  一個ping 172.25.254.250
watch -n -1 cat /proc/net/bonding/bond0
然後我們把兩塊網卡添加到bond0上面
nmcli connetcion add con-name eth0 ifname eth0 type bond-slave master bond0
nmcli connetcion add con-name eth1 ifname eth1 type bond-slave master bond0

分別把兩塊網卡添加上去

然後我們在監控bond裏面可以看見是先添加上去的eth0在工作
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 1
Permanent HW addr: 52:54:00:00:0e:0a
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 52:54:00:77:c2:ad
Slave queue ID: 0

如果ifconfig eth0 down          ##把eth0網卡down掉

ifconfig eth0 up            ##up


#######team######## team類新的最多可以掛8個網卡  bond只能掛兩個
在做這些之前我們要把剛纔做的bond刪掉
nmcli connetcion delete eth0
nmcli connetcion delete eth1
nmcli connetcion delete bond0
nmcli connetcion add con-name team0 ifname team0 type team config '{"runner":{"name":"activebackup"}}' ip4 172.25.254.114/24        ##添加team名爲team0
 
分別把eth0和eth1添加到team0中
nmcli connetcion add con-name eth0 type team-slave ifname eth0 master team0
nmcli connetcion add con-name eth1 type team-slave ifname eth1 master team0

監控team的命令:watch -n 1 teamdctl team0 stat
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章