In the absence of a switch or hub, multiple http://www.aliyun.com/zixun/aggregation/9600.html "> > Does the laptop have no way to share the surf at the same time using a network interface?" Considering that most laptops now have their own wireless network card devices, we can find a way to connect these wireless card devices to form a simple wi ...
It's often a matter of carrying a laptop to a foreign business trip, but when people share a hotel room, we may sometimes get into trouble with not being able to surf the Internet at the same time, because most hotel rooms only provide an Internet access for customers, In other words, only one customer can surf the Internet at one time using the only Internet interface in the room, while other customers are not sharing a single Internet channel to surf the web, even if they are carrying laptops. So, in the absence of a switch or hub, can multiple laptops have no way to share the same surf with a single network interface? Considering that most laptops have their own wireless network card devices, we can find a way to interconnect these wireless card devices to form a simple wireless net, Then let the wireless network through the only network export for extranet access, so that all notebook computers to share the purpose of the Internet.
Wireless Internet sharing requires several conditions:
1 Establish a hoc mode wireless network (hoc is a dedicated mode for bridging)
2 Set IP transfer allowed
3 Set Iptables forwarding to convert the IP request of a shared user to a host request
4 Set up a shared machine routing, DNS
Specific steps:
1 iwconfig eth1 Essid "* *" key s: "* * *" mode hoc
Ifconfig eth1 192.168.0.1 up
2 sudo vi/etc/sysctl.conf
Uncomment Net.ipv4.ip_forward = 1
3 sudo iptables-f
sudo iptables-p INPUT ACCEPT
sudo iptables-p FORWARD ACCEPT
sudo iptables-t nat-a postrouting-o eth0-j Masquerade
4 shared host uses static address 192.168.0.*
Subnet Mask: 255.255.255.0
Router: 192.168.0.1
DNS uses the same DNS as the host (DNS in/etc/resolv.conf)
ETH1 is a wireless network (shared by it)
Eth0 is 8631.html "> wired network (already networked)