|
|||||||||||||||||||||||||||||||
1. Solaris TCPIP Protocol Suite (Overview) 2. Planning an IPv4 Addressing Scheme (Tasks 3. Planning an IPv6 Addressing Scheme (Overview) 4. Planning an IPv6 Network (Tasks) 5. Configuring TCP/IP Network Services and IPv4 Addressing (Tasks) 6. Administering Network Interfaces (Tasks) 7. Enabling IPv6 on a Network (Tasks) 8. Administering a TCP/IP Network (Tasks) Major TCP/IP Administrative Tasks (Task Map) Monitoring the Interface Configuration With the ifconfig Command Monitoring Network Status With the netstat Command How to Display Statistics by Protocol How to Display the Status of Transport Protocols How to Display Network Interface Status How to Display the Status of Sockets How to Display the Status of Transmissions for Packets of a Specific Address Type How to Display the Status of Known Routes Probing Remote Hosts With the ping Command How to Determine if a Remote Host Is Running How to Determine if a Host Is Dropping Packets Administering and Logging Network Status Displays How to Control the Display Output of IP-Related Commands How to Log Actions of the IPv4 Routing Daemon How to Trace the Activities of the IPv6 Neighbor Discovery Daemon Displaying Routing Information With the traceroute Command How to Find Out the Route to a Remote Host Monitoring Packet Transfers With the snoop Command How to Check Packets From All Interfaces How to Capture snoop Output Into a File How to Check Packets Between an IPv4 Server and a Client How to Monitor IPv6 Network Traffic Administering Default Address Selection How to Administer the IPv6 Address Selection Policy Table How to Modify the IPv6 Address Selection Table for the Current Session Only 9. Troubleshooting Network Problems (Tasks) 10. TCP/IP and IPv4 in Depth (Reference) 12. About Solaris DHCP (Overview) 13. Planning for DHCP Service (Tasks) 14. Configuring the DHCP Service (Tasks) 15. Administering DHCP (Tasks) 16. Configuring and Administering DHCP Clients 17. Troubleshooting DHCP (Reference) 18. DHCP Commands and Files (Reference) 19. IP Security Architecture (Overview) 21. IP Security Architecture (Reference) 22. Internet Key Exchange (Overview) 24. Internet Key Exchange (Reference) 25. Solaris IP Filter (Overview) 28. Administering Mobile IP (Tasks) 29. Mobile IP Files and Commands (Reference) 30. Introducing IPMP (Overview) 31. Administering IPMP (Tasks) Part VI IP Quality of Service (IPQoS) 32. Introducing IPQoS (Overview) 33. Planning for an IPQoS-Enabled Network (Tasks) 34. Creating the IPQoS Configuration File (Tasks) 35. Starting and Maintaining IPQoS (Tasks) 36. Using Flow Accounting and Statistics Gathering (Tasks) |
Monitoring the Interface Configuration With the ifconfig CommandYou use the ifconfig command to manually assign IP addresses to interfaces and to manually configure interface parameters. In addition, the Solaris startup scripts run ifconfig to configure pseudo interfaces, such as 6to4 tunnel endpoints. This book contains many tasks that use the various options of the versatile ifconfig command. For a complete description of this command, its options, and its variables, refer to the ifconfig(1M) man page. The basic syntax of ifconfig follows: ifconfig interface [protocol-family] How to Get Information About a Specific InterfaceUse the ifconfig command to determine basic information about the interfaces of a particular system. For example, a simple ifconfig query can tell you the following:
The following procedure shows how to use the ifconfig command to obtain basic configuration information about a system's interfaces.
The following example shows how to obtain information about the eri interface on a particular host by using the ifconfig command. # ifconfig eri eri0: flags=863<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 1 inet 10.0.0.112 netmask ffffff80 broadcast 10.8.48.127 ether 8:0:20:b9:4c:54 The next table describes the variable information in an ifconfig query. The preceding output is used as an example.
How to Display Interface Address AssignmentsRouters and multihomed hosts have more than one interface and, often, more than one IP address assigned to each interface. You can use the ifconfig command to display all addresses that are assigned to the interfaces of a system. You can also use the ifconfig command to display only IPv4 or IPv6 address assignments. To additionally display the MAC addresses of the interfaces, you must first log in as superuser or assume the appropriate role. For more information on the ifconfig command, see the ifconfig(1M) man page.
This example shows entries for a host with solely a primary network interface, qfe0. Nevertheless, the ifconfig output shows that three forms of addresses are currently assigned to qfe0: loopback (lo0), IPv4 (inet), and IPv6 (inet6). In the IPv6 section of the output, note that the line for interface qfe0 displays the link-local IPv6 address. The second address for qfe0 is displayed on the qfe0:1 line. % ifconfig -a lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 qfe0: flags=1004843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.0.0.112 netmask ffffff80 broadcast 10.0.0.127 ether 8:0:20:b9:4c:54 lo0: flags=2000849 <UP,RUNNING,MULTICAST,IPv6> mtu 8252 index 1 inet6 ::1/128 qfe0: flags=2000841 <UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2 ether 8:0:20:b9:4c:54 inet6 fe80::a00:20ff:feb9:4c54/10 qfe0:1: flags=2080841 <UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2 inet6 2001:db8:3c4d:48:a00:20ff:feb9:4c54/64Example 8-3 Displaying Addressing Information for All IPv4 Interfaces This example shows the IPv4 address that is configured for a multihomed host. You do not need to be logged in as superuser to run this form of the ifconfig command. % ifconfig -a4 lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 qfe0: flags=1004843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.0.0.112 netmask ffffff80 broadcast 10.0.0.127 ether 8:0:20:b9:4c:54 qfe1: flags=1004843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.0.0.118 netmask ffffff80 broadcast 10.0.0.127 ether 8:0:20:6f:5e:17Example 8-4 Displaying Addressing Information for All IPv6 Interfaces This example shows only the IPv6 addresses that are configured for a particular host. You do not need to be logged in as superuser to run this form of the ifconfig command. % ifconfig -a6 lo0: flags=2000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1 inet6 ::1/128 qfe0: flags=2000841 <UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2 ether 8:0:20:b9:4c:54 inet6 fe80::a00:20ff:feb9:4c54/10 qfe0:1: flags=2080841 <UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2 inet6 2001:db8:3c4d:48:a00:20ff:feb9:4c54/64 This output from ifconfig shows the following three types of IPv6 address forms that are assigned to the single interface of a host:
|
||||||||||||||||||||||||||||||
|