?? linux tutorial - linux network administration.mht
字號:
<TR>
<TD><TT>ethtool -g eth0</TT></TD>
<TD>Queries ethernet device for rx/tx ring parameter=20
information.</TD></TR>
<TR>
<TD><TT>ethtool -a eth0</TT> </TD>
<TD>Queries ethernet device for pause parameter=20
information.</TD></TR>
<TR>
<TD><TT>ethtool -c eth0</TT> </TD>
<TD>Queries ethernet device for coalescing =
information.</TD></TR>
<TR>
<TD><TT>ethtool -i eth0</TT> </TD>
<TD>Queries ethernet device for associated driver=20
information.</TD></TR>
<TR>
<TD><TT>ethtool -d eth0</TT> </TD>
<TD>Prints a register dump for the specified ethernet=20
device.</TD></TR>
<TR>
<TD><TT>ethtool -k eth0</TT> </TD>
<TD>Queries ethernet device for offload =
information.</TD></TR>
<TR>
<TD><TT>ethtool -S eth0</TT> </TD>
<TD>Queries ethernet device for NIC and driver=20
statistics.</TD></TR></TBODY></TABLE></DD></DL></LI></UL>
<P>Man Pages:=20
<UL>
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dmii-tool=
">mii-tool</A>=20
- view, manipulate media-independent interface status=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dethtool"=
>ethtool</A>=20
- Display or change ethernet card settings </LI></UL><A =
name=3DROUTE></A>
<P>
<HR SIZE=3D5>
<TABLE cellSpacing=3D0 cellPadding=3D2 width=3D"100%" border=3D0>
<TBODY>
<TR bgColor=3D#ffcc33>
<TD><B><BIG>Route:</BIG></B></TD></TR></TBODY></TABLE>
<P>Static routes: IP (Internet Protocol) uses a routing table to =
determine=20
where packets should be sent. First the packet is examined to see =
if its'=20
destination is for the local or remote network. If it is to be =
sent to a=20
remote network, the routing table is consulted to determine the =
path. If=20
there is no information in the routing table then the packet is =
sent to=20
the default gateway. Static routes are set with the <TT>route</TT> =
command=20
and with the configuration file <BR>(Red Hat/Fedora):=20
<TT>/etc/sysconfig/network-scripts/route-eth0</TT> <BR>or <BR>(Red =
Hat 7:=20
<TT>/etc/sysconfig/static-routes</TT>) <BR>(S.u.s.e. 9.2:=20
<TT>/etc/sysconfig/network/routes</TT>):=20
<DL>
<DD>
<TABLE cellSpacing=3D1 cellPadding=3D4 width=3D"100%" =
bgColor=3D#000000=20
border=3D0>
<TBODY>
<TR bgColor=3D#c0c0c0>
<TD><PRE>10.2.3.0/16 via 192.168.10.254
</PRE></TD></TR></TBODY></TABLE>See command:=20
<TT>/etc/sysconfig/network-scripts/ifup-routes eth0</TT> =
</DD></DL>
<P>Dynamic routes: RIP (Routing Information Protocol) is used to =
define=20
dynamic routes. If multiple routes are possible, RIP will choose =
the=20
shortest route. (Fewest hops between routers not physical =
distance.)=20
Routers use RIP to broadcast the routing table over UDP port 520. =
The=20
routers would then add new or improved routes to their routing =
tables.=20
<P>Man pages:=20
<UL>
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Droute">r=
oute</A>=20
- show / manipulate the IP routing table (Static route) =
<BR>Examples:=20
<UL>
<LI>Show routing table: <TT>route -e</TT>=20
<LI>Access individual computer host specified via network =
interface=20
card eth1: <BR><TT>route add -host 123.213.221.231 eth1</TT>=20
<LI>Access ISP network identified by the network address and =
netmask=20
using network interface card eth0: <BR><TT>route add -net =
10.13.21.0=20
netmask 255.255.255.0 gw 192.168.10.254 eth0</TT> =
<BR>Conversly:=20
<TT>route del -net 10.13.21.0 netmask 255.255.255.0 gw =
192.168.10.254=20
eth0</TT>=20
<LI>Specify default gateway to use to access remote network =
via=20
network interface card eth0: <BR><TT>route add default gw =
201.51.31.1=20
eth0</TT> <BR>(Gateway can also be defined in=20
<TT>/etc/sysconfig/network</TT>)=20
<LI>Specify two gateways for two network destinations: (i.e. =
one=20
external, one internal private network. Two routers/gateways =
will be=20
specified.) <BR>Add internet gateway as before: <TT>route add =
default=20
gw 201.51.31.1 eth0</TT> <BR>Add second private network: =
<TT>route add=20
-net 10.0.0.0 netmask 255.0.0.0 gw 192.168.10.254 eth0</TT> =
</LI></UL>
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Drouted">=
routed</A>=20
- network routing daemon. Uses RIP protocol to update routing =
table.=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dipx_rout=
e">ipx_route</A>=20
- show / manipulate the IPX routing table - IPX is the Novell =
networking=20
protocol (Not typically used unless your office has Novell =
servers)=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Difuser">=
ifuser</A>=20
- Identify destinations routed to a particular network =
interface.=20
</LI></UL><A name=3DVPN></A>
<P>
<HR SIZE=3D5>
<TABLE cellSpacing=3D0 cellPadding=3D2 width=3D"100%" border=3D0>
<TBODY>
<TR bgColor=3D#ffcc33>
<TD><B><BIG>VPN, =
Tunneling:</BIG></B></TD></TR></TBODY></TABLE>
<UL>
<LI><B><A=20
=
href=3D"http://www.yolinux.com/TUTORIALS/LinuxCommercialApplications.html=
#VPN">Commercial=20
VPN Linux software solutions</A> - YoLinux</B>=20
<LI><A href=3D"http://openvpn.net/">OpenVPN</A> - SSL VPN =
solution for=20
site to site, WiFi security, and enterprise-scale remote access =
with=20
load balancing, failover, and fine-grained access-controls.=20
<LI>CIPE: Crypto IP Encapsulation (Easiest way to configure two =
Linux=20
gateways connecting two private networks over the internet with=20
encryption.)=20
<UL>
<LI><A =
href=3D"http://sites.inka.de/sites/bigred/devel/cipe.html">CIPE=20
Home page</A> - CIPE is a simple encapsulation system that =
securely=20
connects two subnets.=20
<LI><A=20
=
href=3D"http://www.hasely.com/Linux/Documentation/Mini_How_To/VPN_Firewal=
l_Gateway/">VPN,=20
Firewall, Gateway Mini How To</A> - Keith Hasely=20
<LI><A =
href=3D"http://en.tldp.org/HOWTO/mini/Cipe+Masq.html">The Linux=20
Cipe+Masquerading mini-HOWTO</A> - Anthony Ciaravalo =
</LI></UL>
<LI><A href=3D"http://www.flora.org/freeswan/">Freeswan =
IPSec</A> - An=20
IPSec project for Linux (known as Freeswan and KLIPS).=20
<LI><A=20
=
href=3D"http://www.cerritoslug.org/tutorials/gre_tunneling.html">GRE=20
Tunneling</A> - Hugo Samayoa=20
<LI><A href=3D"http://www.yolinux.com/HOWTO/VPN-HOWTO.html">VPN =
HowTo</A>=20
- Matthew D. Wilson=20
<LI><A href=3D"http://www.cs.hmc.edu/~me/linux/vpn/">Linux VPN =
support</A>=20
- PPTP, L2TP, ppp over SSH tunnel, VPN support working with =
128-bit rc4=20
encryption. By Michael Elkins=20
<LI><A =
href=3D"http://www.scooter.cx/alpha/pptp/howto.html">Installing and=20
Running PPTP on Linux</A>=20
<LI><A href=3D"http://www.worldvisions.ca/tunnelv/">Tunnel =
Vision VPN for=20
Linux</A> - creates an encrypted VPN between two Tunnel =
Vision-capable=20
sites.=20
<LI><A=20
=
href=3D"ftp://ftp.rubyriver.com/pub/jhardin/masquerade/ip_masq_vpn.html">=
Linux=20
VPN Masquerade</A>=20
<LI><A href=3D"http://www.antd.nist.gov/cerberus/">Cerberus</A> =
- An IPsec=20
implementation for Linux=20
<LI><A href=3D"http://www.marko.net/l2tp/">L2TPD</A> - Layer Two =
Tunneling=20
Protocol. (For PPP)=20
<LI><A=20
=
href=3D"http://www.ietf.org/html.charters/l2tpext-charter.html">L2TP=20
Extensions (l2tpext) Internet Drafts</A>.=20
<LI><A=20
=
href=3D"http://www.its.caltech.edu/its/services/networkra/vpn/index.shtml=
">Description=20
of the CISCO VPN at Cal Tech</A> - Supports Linux (kernel 2.2), =
Solaris,=20
MS/Windows 95/98/ME/NT/2000, Mac OS X/7.6-9.x </LI></UL>
<P><A name=3DCOMMANDS></A>
<P>
<HR SIZE=3D5>
<TABLE cellSpacing=3D0 cellPadding=3D2 width=3D"100%" border=3D0>
<TBODY>
<TR bgColor=3D#ffcc33>
<TD><B><BIG>Usefull Linux networking=20
commands:</BIG></B></TD></TR></TBODY></TABLE>
<UL>
<LI><TT>/etc/rc.d/init.d/network start</TT> - command to =
start,=20
restart or stop the network=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dnetstat"=
>netstat</A>=20
- Display connections, routing tables, stats etc=20
<UL>
<LI>List externally connected processes: <TT>netstat =
-punta</TT>=20
<LI>List all connected processes: <TT>netstat -nap</TT>=20
<LI>Show network statistics: <TT>netstat -s</TT>=20
<LI>Kernel interface table info: <TT>netstat -a -i eth0</TT> =
</LI></UL>
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dping">pi=
ng</A>=20
- send ICMP ECHO_REQUEST packets to network hosts. Use Cntl-C to =
stop=20
ping.=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dtracerou=
te">traceroute</A>=20
- print the route packets take to network host=20
<UL>
<LI><TT>traceroute <I>IP-address-of-server</I></TT>=20
<LI><TT>traceroute <I>domain-name-of-server</I></TT> =
</LI></UL>
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dmtr">mtr=
</A>=20
- a network diagnostic tool introduced in Fedora - Like =
traceroute=20
except it gives more network quality and network diagnostic =
info. Leave=20
running to get real time stats. Reports best and worst round =
trip times=20
in milliseconds.=20
<UL>
<LI><TT>mtr <I>IP-address-of-server</I></TT>=20
<LI><TT>mtr <I>domain-name-of-server</I></TT> </LI></UL>
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dwhois">w=
hois</A>=20
- Lookup a domain name in the internic whois database.=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dfinger">=
finger</A>=20
- Display information on a system user. i.e. <TT>finger=20
<I>user@host</I></TT> Uses <TT>$HOME/.plan</TT> and=20
<TT>$HOME/.project</TT> user files. Often used by game =
developers. See=20
<A=20
=
href=3D"http://finger.planetquake.com/">http://finger.planetquake.com/</A=
>=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Diptables=
">iptables</A>=20
- IP firewall administration (Linux kernel 2.6/2.4) See <A=20
=
href=3D"http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGate=
way.html">YoLinux=20
firewall/gateway configuration</A>.=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dipchains=
">ipchains</A>=20
- IP firewall administration (Linux kernel 2.2) See <A=20
=
href=3D"http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGate=
way.html">YoLinux=20
firewall/gateway configuration</A>.=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dsocklist=
">socklist</A>=20
- Display list of open sockets, type, port, process id and the =
name of=20
the process. Kill with <TT>fuser</TT> or <TT>kill</TT>.=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dhost">ho=
st</A>=20
- Give a host name and the command will return IP address. =
Unlike=20
<TT>nslookup</TT>, the <TT>host</TT> command will use both=20
<TT>/etc/hosts</TT> as well as DNS. <BR>Example: <TT>host=20
<I>domain-name-of-server</I></TT>=20
<LI><A=20
=
href=3D"http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=3Dnslookup=
">nslookup</A>=20
- Give a host name and the command will return IP address. Also =
see <A=20
=
href=3D"http://www.yolinux.com/TUTORIALS/LinuxTutorialWebSiteConfig.html#=
DNSTEST">Testing=20
your DNS</A> (YoLinux Tutorial) Note that nslookup does not use =
the=20
<TT>/etc/hosts</TT> file. </LI></UL><A name=3DINET></A>
<P>
<HR SIZE=3D5>
<TABLE cellSpacing=3D0 cellPadding=3D2 width=3D"100%" border=3D0>
<TBODY>
<TR bgColor=3D#ffcc33>
<TD><B><BIG>inetd/xinetd: Network Socket Listener=20
Daemons:</BIG></B></TD></TR></TBODY></TABLE>
<P>The network listening daemons listen and respond to all network =
socket=20
connections made on the TCP/IP ports assigned to it. The ports are =
defined=20
by the file <TT>/etc/services</TT>. When a connection is made, the =
listener will attempt to invok
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -