neutron基础一(网络基本命令)基本命令,包括veth peer
- ip addr
- ip link
- tcpdump -i veth1 -e -v
- route -n
- ip route
- arp
- ethtool -S veth0
- ip link add type veth
- ip link set dev veth0 up
- ip addr add dev veth0 192.168.3.1/29
- ping -I veth0 192.168.3.2
[root@centos7 ~]# cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
eth0: 5166799 58052 0 0 0 0 0 0 46248 356 0 0 0 0 0 0
lo: 340 4 0 0 0 0 0 0 340 4 0 0 0 0 0 0
virbr0-nic: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
virbr0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[root@centos7 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.128.1 0.0.0.0 UG 0 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
192.168.128.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0
[root@centos7 ~]# ip route
default via 192.168.128.1 dev eth0
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
192.168.128.0/20 dev eth0 proto kernel scope link src 192.168.139.55
[root@centos7 ~]# cat /proc/net/route
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
eth0 00000000 0180A8C0 0003 0 0 0 00000000 0 0 0
virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0
eth0 0080A8C0 00000000 0001 0 0 0 00F0FFFF 0 0 0
[root@centos7 ~]# arp
Address HWtype HWaddress Flags Mask Iface
localhost ether 3c:8c:40:34:a9:28 C eth0
localhost ether b0:83:fe:9a:d7:e0 C eth0
[root@centos7 ~]# ip neighbor
192.168.128.1 dev eth0 lladdr 3c:8c:40:34:a9:28 REACHABLE
192.168.137.27 dev eth0 lladdr b0:83:fe:9a:d7:e0 REACHABLE
[root@centos7 ~]# cat /proc/net/arp
IP address HW type Flags HW address Mask Device
192.168.128.1 0x1 0x2 3c:8c:40:34:a9:28 * eth0
192.168.137.27 0x1 0x2 b0:83:fe:9a:d7:e0 * eth0
[root@centos7 ~]# netstat -nltpu|grep sshd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1377/sshd
tcp6 0 0 :::22 :::* LISTEN 1377/sshd
[root@centos7 ~]# ss -nltp|grep sshd
LISTEN 0 128 *:22 *:* users:(("sshd",pid=1377,fd=3))
LISTEN 0 128 :::22 :::* users:(("sshd",pid=1377,fd=4))
[root@centos7 ~]# cat /proc/net/tcp
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode
0: 017AA8C0:0035 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 15557 1 ffff880fe4540000 100 0 0 10 0
1: 00000000:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 10051 1 ffff880fe3820000 100 0 0 10 0
2: 0100007F:0277 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 27478 1 ffff880fe3878000 100 0 0 10 0
3: 0100007F:0019 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 27743 1 ffff880fe3d18000 100 0 0 10 0
4: 378BA8C0:0016 1B89A8C0:CD20 01 00000060:00000000 01:00000024 00000000 0 0 31998 4 ffff880fe5b70000 36 4 31 8 7
[root@centos7 ~]# ip -s -s link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes packets errors dropped overrun mcast
340 4 0 0 0 0
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
340 4 0 0 0 0
TX errors: aborted fifo window heartbeat
0 0 0 0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 50:50:18:aa:80:17 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
6137827 69361 0 0 0 0
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
79639 583 0 0 0 0
TX errors: aborted fifo window heartbeat
0 0 0 0
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
TX errors: aborted fifo window heartbeat
0 0 0 0
4: virbr0-nic: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN mode DEFAULT qlen 500
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
TX errors: aborted fifo window heartbeat
0 0 0 0
[root@centos7 ~]# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 50:50:18:aa:80:17 brd ff:ff:ff:ff:ff:ff
inet 192.168.139.55/20 brd 192.168.143.255 scope global dynamic eth0
valid_lft 1433sec preferred_lft 1433sec
inet6 fe80::5250:18ff:feaa:8017/64 scope link
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
[root@centos7 ~]# watch -d ip -s -s link
★★★★★★★★★★★★★★★★★★★★★
veth peer
[root@centos7 ~]# ip link add type veth
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 50:50:18:aa:80:17 brd ff:ff:ff:ff:ff:ff
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
4: virbr0-nic: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN mode DEFAULT qlen 500
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
5: veth0@veth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
link/ether 96:e2:e3:ed:1d:b9 brd ff:ff:ff:ff:ff:ff
6: veth1@veth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
link/ether 72:7f:5a:c4:7d:1a brd ff:ff:ff:ff:ff:ff
[root@centos7 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 50:50:18:aa:80:17 brd ff:ff:ff:ff:ff:ff
inet 192.168.139.55/20 brd 192.168.143.255 scope global dynamic eth0
valid_lft 1325sec preferred_lft 1325sec
inet6 fe80::5250:18ff:feaa:8017/64 scope link
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
5: veth0@veth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 96:e2:e3:ed:1d:b9 brd ff:ff:ff:ff:ff:ff
6: veth1@veth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 72:7f:5a:c4:7d:1a brd ff:ff:ff:ff:ff:ff
[root@centos7 ~]# ip link set dev veth1 up
[root@centos7 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 50:50:18:aa:80:17 brd ff:ff:ff:ff:ff:ff
inet 192.168.139.55/20 brd 192.168.143.255 scope global dynamic eth0
valid_lft 1302sec preferred_lft 1302sec
inet6 fe80::5250:18ff:feaa:8017/64 scope link
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
5: veth0@veth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 96:e2:e3:ed:1d:b9 brd ff:ff:ff:ff:ff:ff
6: veth1@veth0: <NO-CARRIER,BROADCAST,MULTICAST,UP,M-DOWN> mtu 1500 qdisc pfifo_fast state LOWERLAYERDOWN qlen 1000
link/ether 72:7f:5a:c4:7d:1a brd ff:ff:ff:ff:ff:ff
[root@centos7 ~]# ip a add dev veth0 192.168.3.1/29
[root@centos7 ~]# ip route
default via 192.168.128.1 dev eth0
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
192.168.128.0/20 dev eth0 proto kernel scope link src 192.168.139.55
[root@centos7 ~]# ip a add dev veth1 192.168.3.2/29
[root@centos7 ~]# ip route
default via 192.168.128.1 dev eth0
192.168.3.0/29 dev veth1 proto kernel scope link src 192.168.3.2
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
192.168.128.0/20 dev eth0 proto kernel scope link src 192.168.139.55
[root@centos7 ~]# ip link set dev veth0 up
[root@centos7 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 50:50:18:aa:80:17 brd ff:ff:ff:ff:ff:ff
inet 192.168.139.55/20 brd 192.168.143.255 scope global dynamic eth0
valid_lft 1193sec preferred_lft 1193sec
inet6 fe80::5250:18ff:feaa:8017/64 scope link
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
link/ether 52:54:00:71:94:cc brd ff:ff:ff:ff:ff:ff
5: veth0@veth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 96:e2:e3:ed:1d:b9 brd ff:ff:ff:ff:ff:ff
inet 192.168.3.1/29 scope global veth0
valid_lft forever preferred_lft forever
inet6 fe80::94e2:e3ff:feed:1db9/64 scope link
valid_lft forever preferred_lft forever
6: veth1@veth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 72:7f:5a:c4:7d:1a brd ff:ff:ff:ff:ff:ff
inet 192.168.3.2/29 scope global veth1
valid_lft forever preferred_lft forever
inet6 fe80::707f:5aff:fec4:7d1a/64 scope link
valid_lft forever preferred_lft forever
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]# ip route
default via 192.168.128.1 dev eth0
192.168.3.0/29 dev veth1 proto kernel scope link src 192.168.3.2
192.168.3.0/29 dev veth0 proto kernel scope link src 192.168.3.1
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
192.168.128.0/20 dev eth0 proto kernel scope link src 192.168.139.55
[root@centos7 ~]# ethtool -S veth0
NIC statistics:
peer_ifindex: 6
[root@centos7 ~]# ethtool -S veth1
NIC statistics:
peer_ifindex: 5
[root@centos7 ~]#
peer_ifindex: 5
[root@centos7 ~]# ping -I veth0 192.168.3.2
PING 192.168.3.2 (192.168.3.2) from 192.168.3.1 veth0: 56(84) bytes of data.
From 192.168.3.1 icmp_seq=1 Destination Host Unreachable
From 192.168.3.1 icmp_seq=2 Destination Host Unreachable
From 192.168.3.1 icmp_seq=3 Destination Host Unreachable
From 192.168.3.1 icmp_seq=4 Destination Host Unreachable
From 192.168.3.1 icmp_seq=5 Destination Host Unreachable
From 192.168.3.1 icmp_seq=6 Destination Host Unreachable
From 192.168.3.1 icmp_seq=7 Destination Host Unreachable
From 192.168.3.1 icmp_seq=8 Destination Host Unreachable
★★开另一个ssh
[root@centos7 ~]# tcpdump -i veth1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on veth1, link-type EN10MB (Ethernet), capture size 65535 bytes
07:21:39.312134 ARP, Request who-has localhost tell localhost, length 28
07:21:40.312989 ARP, Request who-has localhost tell localhost, length 28
07:21:41.314973 ARP, Request who-has localhost tell localhost, length 28
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]# tcpdump -i veth1 -v
tcpdump: listening on veth1, link-type EN10MB (Ethernet), capture size 65535 bytes
07:22:39.351507 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has localhost tell localhost, length 28
07:22:40.352999 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has localhost tell localhost, length 28
07:22:41.354977 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has localhost tell localhost, length 28
[root@centos7 ~]# tcpdump -i veth1 -e
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on veth1, link-type EN10MB (Ethernet), capture size 65535 bytes
07:22:59.655361 96:e2:e3:ed:1d:b9 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 42: Request who-has localhost tell localhost, length 28
07:23:00.657021 96:e2:e3:ed:1d:b9 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 42: Request who-has localhost tell localhost, length 28
07:23:01.658978 96:e2:e3:ed:1d:b9 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 42: Request who-has localhost tell localhost, length 28
如果第一个窗口
[root@centos7 ~]# ping -I veth0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.3.1 veth0: 56(84) bytes of data.
From 192.168.3.1 icmp_seq=1 Destination Host Unreachable
From 192.168.3.1 icmp_seq=2 Destination Host Unreachable
From 192.168.3.1 icmp_seq=3 Destination Host Unreachable
则
[root@centos7 ~]# tcpdump -i veth1 -e -v
tcpdump: listening on veth1, link-type EN10MB (Ethernet), capture size 65535 bytes
07:23:45.375190 96:e2:e3:ed:1d:b9 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has google-public-dns-a.google.com tell localhost, length 28
07:23:46.377023 96:e2:e3:ed:1d:b9 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has google-public-dns-a.google.com tell localhost, length 28
07:23:47.378972 96:e2:e3:ed:1d:b9 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has google-public-dns-a.google.com tell localhost, length 28
neutron基础一(网络基本命令)基本命令,包括veth peer的更多相关文章
- 黑马程序员_Java基础:网络编程总结
------- android培训.java培训.期待与您交流! ---------- Java语言是在网络环境下诞生的,它是第一个完全融入网络的语言,虽然不能说它是对支持网络编程做得最好的语言,但是 ...
- openstack基础:网络
Neutron 功能 Neutron 为整个 OpenStack 环境提供网络支持,包括二层交换,三层路由,负载均衡,防火墙和 *** 等.Neutron 提供了一个灵活的框架,通过配置,无论是开源还 ...
- Neutron中的网络I/O虚拟化
为了提升网络I/O性能.虚拟化的网络I/O模型也在不断的演化: 1,全虚拟化网卡(emulation).如VMware中的E1000用来仿真intel 82545千兆网卡,它的功能更完备,如相比一些半 ...
- Python黑客编程基础3网络数据监听和过滤
网络数据监听和过滤 课程的实验环境如下: • 操作系统:kali Linux 2.0 • 编程工具:Wing IDE • Python版本:2.7.9 • 涉及 ...
- 黑马程序员:Java基础总结----网络编程
黑马程序员:Java基础总结 网络编程 ASP.Net+Android+IO开发 . .Net培训 .期待与您交流! 网络编程 网络通讯要素 . IP地址 . 网络中设备的标识 . 不易记忆,可用 ...
- 网络编程基础:网络基础之网络协议、socket模块
操作系统(简称OS)基础: 应用软件不能直接操作硬件,能直接操作硬件的只有操作系统:所以,应用软件可以通过操作系统来间接操作硬件 网络基础之网络协议: 网络通讯原理: 连接两台计算机之间的Intern ...
- GO学习-(19) Go语言基础之网络编程
Go语言基础之网络编程 现在我们几乎每天都在使用互联网,我们前面已经学习了如何编写Go语言程序,但是如何才能让我们的程序通过网络互相通信呢?本章我们就一起来学习下Go语言中的网络编程. 关于网络编程其 ...
- [Linux网络、命名空间、veth设备对、docker的host模式、container模式、none模式、brideg模式、网桥的增删查,容器与网桥的连接断开]
[Linux网络.命名空间.veth设备对.docker的host模式.container模式.none模式.brideg模式.网桥的增删查,容器与网桥的连接断开] 网络名称空间 为了支持网络协议栈的 ...
- python渗透测试入门——基础的网络编程工具
<Python黑帽子--黑客与渗透测试编程之道学习>这本书是我在学习安全的过程中发现的在我看来十分优秀的一本书,业内也拥有很高的评价,所以在这里将自己的学习内容分享出来. 1.基础的网络编 ...
随机推荐
- p3966单词
后缀自动机版本: 所有的串用(char)('z'+1)连起来,然后建自动机.再用原串在自动机上跑.跑到的位置的endpos就是出现的次数.不过内存有点大. #include <iostream& ...
- 『计算机视觉』Region Proposal by Guided Anchoring
论文地址:Guided Anchoring 不得不佩服自媒体,直接找到了论文作者之一写了篇解析文章,这里给出链接,本文将引用一部分原作者的解析,减少我的打字量,也方便结合比照理解. 一.问题和思路 1 ...
- laravel清缓存,flex简单使用
关于laravel 删除视图缓存:php artisan view:clear 清除运行缓存:php artisan cache:clear 清除配置缓存:php artisan config:cle ...
- python运用turtle 画出汉诺塔搬运过程
python运用turtle 画出汉诺塔搬运过程 1.打开 IDLE 点击File-New File 新建立一个py文件 2.向py文件中输入如下代码 import turtle class Stac ...
- PHP基础入门(五)---PHP面向对象实用基础知识
前言: 今天来和大家介绍一下PHP的面向对象.说到面向对象,我不得不提一下面向过程,因为本人在初学时,常常分不清楚面向对象和面向过程,下面就来给大家介绍一下它们的区别: 面向对象专注于由哪个对象来处理 ...
- 让input不可编辑
有时候,我们希望表单中的文本框是只读的,让用户不能修改其中的信息,如使<input type="text" name="input1" value=&qu ...
- day27_python_1124
1.内容回顾 2.今日内容 3.创建-进程Process 4.join方法 5.进程之间数据隔离 1.内容回顾 # 进程 :是计算机中最小的资源分配单位# 进程的三状态 :就绪 运行 阻塞# 并发和并 ...
- HTML的块级元素和行内元素
行内元素一般是内容的容器,而块级元素一般是其他容器的容器.一般情况下,行内元素只能包含内容或者其它行内元素,宽度和长度依据内容而定,不可以设置,可以和其它元素和平共处于一行:而块级元素可以包含行内元素 ...
- python之路-----MySql操作三
mysql 概述 一.主要内容: 视图 create view name (select * from user where id>5); 触发器 函数 存储过程 索引 二.各模块详细说明 1. ...
- luogu1706全排列
#include<bits/stdc++.h> using namespace std; +]; +]; int search(int k); int print(); int n,num ...