that the NIC is having problems receiving;The number of errors packets in the TX packets is too large to indicate that there is a problem when sending the NIC;RouteThe syntax for the route command is:Route [-cfvnee]Route [-v] [-A family] add [-net|-host] target [netmask Nm] [GW GW] [metric N] [mod] [reinstate] [[Dev] If]Route [-v] [-A family] del [-net|-host] target [G
Copy Code code as follows:
@echo off
REM ETH//eth is the name of the network adapter, which can be queried in a networking connection, such as "local link"
Set eth= "Wireless network Connection"
REM IP//ip for the IP you want to change
Set ip=192.168.1.8
REM GW//GW for gateway address
Set gw=192.168.1.1
REM netmasks//netmasks for subnet masks
Set net
and then copy the following code into:
@echo off
REM ETH//eth is the name of the network adapter, which can be queried in a networking connection, such as "local link"
Set eth= "Wireless network Connection"
REM IP//ip for the IP you want to change
Set ip=192.168.1.8
REM GW//GW for gateway address
Set gw=192.168.1.1
REM netmasks//netmasks for subnet masks
Nowadays, with more and more users of the Win7 system using laptops, laptops have the incomparable advantage of desktop, which is to carry conveniently. Users can use the notebook computer in different places, but because of the system IP address setting reason, the user is unable to connect the network when using the notebook computer, but often changes the IP to be very troublesome. So what's the best way to solve this problem? In fact, we can quickly change the IP through batch files, the fol
Divided into system routing, network card routing (redhat8 above), static routing
System routing can be set in/etc/sysconfig/network
Network card routing can be set in/ETC/SYSCONFIG/NEWORK-SCRIPT/IFCFG-ETHX
Static routing in/etc/sysconfig/networking/device/can be set in Ethx.route, static route as the name implies, is fixed, set up the general will not easily change the route
Reproduced:
http://tieba.baidu.com/f?kz=636594999
Static routing configuration files in Linux
Static routing: Many
1, IfconfigYou can use the Ifconfig command to configure and view the configuration of network interfaces. For example:(1) Configure the IP address of the eth0 and activate the device at the same time. #ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up(2) Configure the IP address of the eth0 alias device eth0:1 and add the route. #ifconfig eth0 192.168.1.3 #route add–host 192.168.1.3 Dev eth0:1(3) Activate the device. #ifconfig eth0 up(4) Disable the device. #ifconfig eth0 Down(5) Vie
650) this.width=650; "style=" width:600px;height:536px; "src=" https://s3.51cto.com/wyfs02/M02/A7/7E/ Wkiol1nnr57annlkaac4zaoh7_c559.png "title=" 2017-10-18 20-34-29 screen. png "border=" 0 "height=" 536 "hspace=" 0 "vspace=" 0 " Width= "alt=" Wkiol1nnr57annlkaac4zaoh7_c559.png "/>Experimental Purpose:1, add PC1 join VLAN10,PC2J join VLAN20,PC3 join the VLAN30;2, SW2 and SW3 play the role of the route, V10 and VLAN20 mainly in SW2 run, VLAN30 on SW3, and to ensure SW2 and SW3 one of the bad, PC1
.
Finally, we save these commands as a bat file (setip192168423.bat):
Copy Code code as follows:
@echo off
Rem ETH is the name of the network adapter, which can be queried in a networking connection, such as "Local link"
Set//eth "Local link" eth= R>rem IP//ip for the IP
set ip=192.168.4.23
rem GW//GW you want to change for the gateway address
Set
The network configuration command under Linux is ifconfig similar to the ipconfig in the Windows command line. You can use the Ifconfig command to configure and view the configuration of network interfaces. For example: (1) Configure the IP address of the eth0 while activating the device. #ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up (2) configures the IP address of eth0 alias device Eth0:1 and adds a route. #ifconfig eth0 192.168.1.3 #route add–host 192.168.1.3 Dev eth0:1 (3) activates t
In order for the device to access another subnet, you need to increase the routing to the sub-network in the device, here are some information. The basic operations are as follows:In general, to be able to access other subnets to set up the route, for example, your host is in 192.168.10.0/24, and you want to access the 192.168.20.0/24 network host, of course, you know a gateway IP, For example 192.168.10.1 (must be on the same subnet as your host), you can configure the route as such.Add routeRo
text mode.netconfig-d eth0/Setup Eth0netconfig-d eth1/Setup Eth1Set the DHCP mode of the network card to obtain IP automaticallynetconfig-d eth0--bootproto=dhcpManually set the IP of the NIC, etc.Netconfig-d eth0-ip=192.168.1.33-netmask=255.255.255.0-gateway=192.168.1.1(1) Configure the IP address of the eth0 and activate the device at the same time.#ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up(2) Configure the IP address of the eth0 alias device eth0:1 and add the route.#ifconfig eth0:1
= new String (Packet.getdata (), 0, Packet.getlength (), "UTF-8");
LOG.W (Localudpdatareciever.tag, "note" >>>>>> received the message from the service side: "+pfromserver);
}
}
}
"Run Effect"
Client Run Results:
Introduction to NIO Framework (i): Server-side based on Netty4 UDP two-way communication demo demo _qq20160615-3.png
Server-side Run results:
Introduction to NIO Framework (i): Server-side based on Netty4 UDP two-way communication demo demo _qq20160615-4.png
"Supplementary Note
Original article: http://www.cnitblog.com/201/archive/2009/08/20/60887.html
It is very convenient to be familiar with ifconfig.
Ifconfig eth0 new ip
Then edit/etc/sysconfig/network-scripts/ifcfg-eth0 and modify the ip
1. Modify the IP address
[Aeolus @ db1 network-scripts] $ vi ifcfg-eth0
DEVICE = eth0
ONBOOT = yes
BOOTPROTO = static
IPADDR = 219.136.241.211
NETMASK = 255.255.255.255.128
GATEWAY = 219.136.241.254
2. Modify the Gateway
Vi/etc/sysconfig/network
NETWORKING = yes
HOSTNAME = Aaron
GA
We have learned from the article ARP working principles that the host will save and update the local ARP cache table in two cases,1. When receiving the "ARP broadcast-request" Packet2. When an "ARP non-broadcast-reply" packet is received
We can see that the ARP Protocol has no authentication mechanism, and any host in the LAN can forge ARP packets at will. The ARP protocol design is inherently flawed.
Assume that there are three hosts (GW refers t
(which cannot ping the company network ), but Linux cannot ping the XP system machine.
This problem has been solved, and now the XP system can be connected to the company's network segment 192.168.4.0, but also to the Internet
The solution is static routing settings + NAT translation of iptables, which enables the XP system (IP 111.111.112.112) to access the Internet through the IP address eth1 (IP 192.168.4.129) and implement Nat translation.
Static route configuration command
Route add-ne
How to add a static route in rhel7 and rhel71. Use the route command to add
// Route entry to the host
[root@localhost ~]# route add -host 8.8.8.8 dev ens3[root@localhost ~]# route -nKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface0.0.0.0 172.25.8.250 0.0.0.0 UG 100 0 0 ens38.8.8.8 0.0.0.0 255.255.255.255 UH 0 0 0 ens3172.25.0.0 0.0.0.0 255.255.0.0 U 100 0
user, you must use the full path to execute the route command. TP-link g install NIC Driver on fedora Guide
Format: route-n
Format:/sbin/route-n
Used to print the route table. The-N parameter is used to print the IP address directly without printing the host name in the output information. The netstat command also has this parameter.
Format: Route add default GW {IP-ADDRESS} {interface-name}
Used to set the default route (adds a default rout
from multiple IP, generally select the smallest, notify DHCP, and identify theThe selected server4. Server Confirmation Rental: The selected server will eventually issue a confirmation message with the IP address, subnet mask,Default gateway, DNS server and lease periodIP address of the configuration file:/etc/network/interfaces (with cat view or vim edit, the content can be consulted)1 Auto Lo2 iface Lo inet loopback/******* set to dynamic get ip*********/3 Auto Eth04 iface eth0 inet DHCP/****
=114.80.10.79netmask=255.255.255.128Vi/etc/sysconfig/network-scripts/ifcfg-eth14Device=eth14Hwaddr=00:90:fa:76:a5:98Type=ethernetuuid=ebd54026-4412-4cc3-9f74-e065d4328479Onboot=yesNm_controlled=noBootproto=staticipaddr=112.65.20.23netmask=255.255.255.128Note: There are no gateways in the two NIC configuration file. If you add a gateway, only one default route will be displayed in Route-n, and the other network segment is not.[Email protected] network-scripts]# route-nKernel IP Routing TableDesti
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.