mac关闭ipv6选项
1 | $ networksetup -listallnetworkservices |
GUIDE: Oracle VM VirtualBox and Oracle Linux NIC bonding
1 | Author: Dude |
1 | Last updates: |
https://community.oracle.com/thread/2546040
What is Linux network interface bonding? Simply put, the Linux system provides a kernel driver, which can create a logical network device (bond) using 2 or more Network Interface Controllers (NIC) to accomplish link-aggregation and adapter fault-tolerance. For more information, please see the Deployment Guide at https://linux.oracle.com/documentation/
The channel bonding interface supports several modes of operation. In a typical active-backup set up for fault-tolerance, the system performs MII-based health monitoring of the network interface slaves (eth0, eth1) and assigns them according to bond options and interface availability. In active-backup mode (mode 1), only the current active network device is seen externally.
Linux bonding for fault-tolerance under Oracle VM VirtualBox does not seem to function as advertised. Searching the Internet for more information shows that other people have tried to set up Linux bonding using various virtualization products, virtual host network adapter and bonding options, but without success.
It appears the management of Media Access Control addresses (MAC) interferes with internal routing methods between the host and the virtual machine guest. Using the modinfo bonding command (fig. 1) shows a listing of available parameters for the bonding kernel module. The fail_over_mac parameter addresses the Mac address issue in VirtualBox.
1 | # modinfo bonding |
Configuration Example
1 | Virtualization Product: Oracle VM VirtualBox 4.2.10 |
VM adapter settings: Bridged Adapter, Paravirtualized Network (virtio-net)
1 | Adapter1 (eth0): 080027436617, en0, Ethernet 1 |
Note: If you wish to reset the network adapter names and MAC addresses used by the Oracle Linux guest system, erase the content of /etc/udev/rules.d/70-persistent-net.rules
and restart the virtual machine.
1. Create or modify the following configuration files:
/etc/modprobe.d/bonding-eth0_eth1.conf
alias bond0 bonding
/etc/sysconfig/network-scripts/ifcfg-bond0
1 | DEVICE=bond0 |
/etc/sysconfig/network-scripts/ifcfg-eth0
1 | DEVICE=eth0 |
/etc/sysconfig/network-scripts/ifcfg-eth1
1 | DEVICE=eth1 |
2. Restart the system or network services (root):
# service network restart
Configuration Test
Enter the following commands as user root to verify proper operation of NIC bonding:
1 | # tail /var/log/messages |
1 | # ifconfig |
1 | # netstat -rn |
1 | # ifconfig eth0 down |
1 | # ifconfig eth0 up |
During the above test, the client network connection from host 10.0.0.1 (ssh) was maintained without any noticeable interruption. As it can be seen from the syslog and ifconfig command output, the bond0 interface was automatically assigned either the MAC address of eth0 or eth1 and the fail-over worked as advertised.
Centos7网卡配置失败
错误提示
Restarting network (via systemctl): Job for network.service failed. See ‘systemctl status network.service’ and ‘journalctl -xn’ for details.
解决方法
查找原因
systemctl status network.service
cat /var/log/message |grep network
- Could not load file ‘/etc/sysconfig/network-scripts/ifcfg-lo’
This is generated by command ‘nmcli con load /etc/sysconfig/network-scripts/ifcfg-lo’ executed by ‘ifup’
Tadding the line “TYPE=loopback” to the file /etc/sysconfig/network-scripts/ifcfg-lo
- 如果是网卡
ip addr
get mac address- add to /etc/sysconfig/network-scripts/ifcfg-XXXX HWADDR=XXXXXXXXXXX
SSH session slow to start? It's the DNS stupid~~
Ever tried logging into a machine with ssh and found you have to wait much longer than reasonable for the session to start? This happened to me a few times and was especially annoying with machines on my local network (or a VM attached to a virtual network) that should be letting me in immediately.
I eventually got mad enough to strace the SSH daemon and debug what was going on and it turns out it’s a DNS thing. Basically the session is slow to start because the SSH server is trying to lookup the hostname of the SSH client and for whatever reason it’s timing out (e.g., it can’t reach a nameserver, because you happen to be offline)
There are a couple of very simple ways to fix that:
1 | add "UseDNS no" to /etc/ssh/sshd_config |
*** 改项可能会导致远程连接失败
ssh 调试方法
服务端
/usr/sbin/sshd -d
- 客户端
ssh -v -p22 root@192.168.56.10
硬盘只读模式
How to setup tagged VLANs on Mac OS X
- From the Apple menu (upper left corner of your desktop) choose System Preferences…
- Open Network
- In the toolbar below all of your network interfaces, click the gear wheel to access a dropdown menu
- From that dropdown menu, select Manage Virtual Interfaces…
- Click on + to access another dropdown menu
- From that dropdown menu, select New VLAN…
- Enter an appropriate name for your new VLAN, e.g. DMZ
- Enter the desired tag, e.g. 23
- Choose the correct physical interface, normally Ethernet
- Click Create
- Click Done
- Configure your new VLAN interface as you would configure a physical interface, e.g. assign it an IP address, network mask, etc.
- Click Apply
- Close the network preferences window.
svn 取消版本控制
删除这些目录是很简单的,命令如下
find . -type d -name ".svn"|xargs rm -rf
或者
find . -type d -iname ".svn" -exec rm -rf {} \;