#10.59.194.141上执行下面创建的ipip0网卡:
node=10.59.194.141
peer=10.59.194.154
ip tun add ipip0 mode ipip remote $peer local $node
ip link set ipip0 up
ip add add 192.168.200.1 brd 255.255.255.255 peer 192.168.200.2 dev ipip0
ip ro add 192.168.200.0/24 via 192.168.200.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
主机1--路由器1--网络--路由器2--主机2 | |
这样的组网模型中,从主机1 ping 主机2,网络通信的基本原理是怎样的? | |
2、路由基本原理 | |
将整个ping包过程进行分解,步骤如下: | |
1)主机1发送ping包前,需要先进行arp相关操作,具体包括: | |
(1)检查dst ip和local ip,如果不是在同一个网段(本例就不是一个网段),则查看本地arp缓存,确认是否有网关(路由器1)IP对应的mac地址,如果没有,则向网关发送arp请求包。 | |
(2)本地网关收到其arp包后,回复相应的mac地址。 | |
(3)主机1收到arp回复,得到网关mac,更新相应的arp缓存。 | |
2)主机向路由器1发送ping数据包,数据包的dst IP仍为主机2的IP,但dst MAC为路由器1的MAC。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func ip2int(ip net.IP) uint32 { | |
if len(ip) == 16 { | |
return binary.BigEndian.Uint32(ip[12:16]) | |
} | |
return binary.BigEndian.Uint32(ip) | |
} | |
func int2ip(nn uint32) net.IP { | |
ip := make(net.IP, 4) | |
binary.BigEndian.PutUint32(ip, nn) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 10.2.0.3 | |
ip link add vxlan0 type vxlan id 2 dev eth1 dstport 8472 | |
ip link set dev vxlan0 address 72:74:8b:9d:56:e4 | |
ip link set dev vxlan0 up | |
ip ad add 192.168.50.1/24 dev vxlan0 | |
vxlan_dev=vxlan0 | |
peer_vxlan_mac=3e:33:f7:c5:a3:5b | |
peer_vxlan_ip=192.168.50.2 | |
peer_host_ip=10.2.0.2 |
In the diagram below you can see the full authentication flow with all options, starting with the browser on the lower left hand side.
Kubernetes Workstation
+---------------------------------------------------+ +------------------+
| | | |
| +-----------+ apiserver +------------+ | | +------------+ |
| | | proxy | | | | | | |
| | apiserver | | ingress | | | | ingress | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
set node [lindex $argv 0] | |
set passwd [lindex $argv 1] | |
set timeout 30 | |
spawn ssh root@$node | |
expect { | |
"yes/no" { send "yes\r";exp_continue } | |
"password:" { send "$passwd\r" } | |
} | |
expect "*#" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip link add br0 type bridge | |
ip link add br1 type bridge | |
ip link add dev v0 type veth peer name v1 | |
ip link set v0 master br0 | |
ip link set v1 master br1 | |
ip link set br0 up | |
ip link set br1 up | |
ip link set v0 up | |
ip link set v1 up | |
ip ad add 192.168.0.1/24 dev br0 |
v2 http api https://coreos.com/etcd/docs/latest/v2/api.html
etcd compaction https://github.com/coreos/etcd/blob/master/Documentation/op-guide/maintenance.md#space-quota
The followings are v3 apis
export ETCDCTL_API=3
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |