0% found this document useful (0 votes)
13 views9 pages

TCP IP Network Administration

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 9

Help for UNIX System Administrators

TCP/IP Network Administration

A NUTSHELL®
by Craig Hunt

HANDBOOK O'Reilly & Associates, Inc.


Table of Contents
Preface xv
Audience xvi
Organization xvi
UNIX Versions xviii
Conventions xix
Acknowledgments xx
We'd Like to Hear From You xxi

1; Overview of TCP/IP 1
TCP/IP and the Internet 2
TCP/IP Features 3
Protocol Standards 4
A Data Communications Model 5
TCP/IP Protocol Architecture 8
Network Access Layer 11
Internet Layer 12
Internet Protocol 12
Internet Control Message Protocol 17
Transport Layer 18
User Datagram Protocol 19
Transmission Control Protocol 20
Application Layer 24

2: Delivering the Data 27


Addressing, Routing, and Multiplexing 27
The IP Address 29
Address Depletion 32
Subnets 34
Internet Routing Architecture 36
The Routing Table 38
Address Resolution 42
RARP 43
Protocols, Ports, and Sockets 44
Protocol Numbers 45
Port Numbers 46
Sockets 48
3: Name Service Concepts 51
Names and Addresses 51
The Host Table 52
The NIC Host Table 54
Domain Name Service 58
The Domain Hierarchy 59
Creating Domains and Subdomains 61
Domain Names '. 63
BIND, resolver, and named 64
Network Information Service 66

4: Getting Started 67
Connected and Non-connected Networks 68
Obtaining an IP Address 69
The Network Address Application 70
Assigning Host Addresses 73
Obtaining a Domain Name 74
Obtaining an IN-ADDR.ARPA Domain 75
Choosing a Host Name 76
Planning Routing 77
Obtaining an Autonomous System Number 80
Defining the Subnet Mask 81
Specifying the Broadcast Address 83
Sample Planning Sheets 83

5: Basic Configuration 85
Kernel Configuration 85
The BSD Kernel Configuration File 86
TCP/IP in the BSD Kernel 87
BSD TCP/IP System Parameters 90
Adding Network Devices 92
System V Kernel Configuration 94
SCO's netconfig 97
The Internet Daemon 98

6: Configuring the Interface 103


The ifconfig Command 104
Determining the Interface with nets tat 105
Checking the Interface with ifconfig 109
Assigning a Subnet Mask 110
Setting the Broadcast Address 112
Assigning the Network Interface Address 112
The Other Command Options 114
TCP/IP Over a Serial Line 116
The Serial Protocols 117
Choosing a Serial Protocol 120
Installing SLIP 121
SUP for Sun 121
Configuring the SLIP Interface 124
slattach 124
sliplogin 126
Installing PPP 129
Configuring the PPP Interface 130

7: Configuring Routing 133


Common Routing Configurations 134
The Minimal Routing Table 135
Building a Static Routing Table 137
Adding Static Routes 138
The Variety of Routing Protocols 142
Interior Routing Protocols 142
Exterior Protocols 144
Choosing a Routing Protocol 146
Routing Information Protocol 147
Running RIP with routed 148
Exterior Gateway Protocol 150
Configuring the EGP User Process 150
Gateway Routing Daemon 152
gated's Preference Value 152
Configuring gated 154
Sample gated.conf Configurations 156
•The gated Command 163

8: Configuring DNS Name Service 167


BIND: UNIX Name Service 168
BIND Configurations 168
Configuring the Resolver 170
The Resolver Configuration File 171
Configuring named 173
The named.boot File 173

HI
Standard Resource Records 177
The Cache Initialization File 179
The named.locai File 180
The Reverse Domain File 181
The named.hosts File 183
Using nslookup 186

9: Network Applications 191


The r Commands 192
Securing the r Commands 193
The .rhosts File 196
The/usr/hosts Directory 197
Network Information Service 198
The/etc/netgroup File 201
The Network File System 203
NFS Daemons 204
Exporting Filesys terns 206
The/etc/exports File 207
Mounting Remote Filesystems 208
The mount Command 210
The/etc/fstab File 211

10: sendmail 213


sendmail's Function 214
Running sendmail as a Daemon 215
sendmail Aliases 216
The sendmail.cf File 218
Locating a Sample sendmail.cf File 219
General sendmail.cf Structure 219
sendmail Configuration 222
The Define Macro Command 223
The Define Class Command 226
The Set Option Command 228
Denning Trusted Users 230
Denning Mail Precedence 230
Defining Mail Headers 231
Defining Mailers 232
Rewriting the Mail Address 236
Pattern Matching 236
Transforming the Address 238

viii
The Set Ruleset Command 242
Modifying a sendmail.cf File 243
Modifying Local Information 244
Modifying the General Macros 244
Modifying the Classes 245
Modifying the Version Number 246
Modifying Options 247
Modifying the Rewrite Rules 248
Testing sendmail.cf 248
Testing Rewrite Rules 251

//; Troubleshooting TCP/IP 257


Approaching a Problem 258
Troubleshooting Hints 259
Diagnostic Tools 260
Testing Basic Connectivity 262
The ping Command 264
Troubleshooting Network Access 266
Troubleshooting with the ifconfig Command 266
Troubleshooting with the arp Command 268
Checking the Interface with netstat 271
Network Hardware Problems 275
Checking Routing 275
Checking RIP Updates 277
Tracing routes 278
Checking Name Service 282
dig, an Alternative to nslookup 288
Analyzing Protocol Problems 290
Packet Filters , 291
Protocol Case Study 295

12: Network Security 301


Security Planning 302
Assessing the Threat 302
Distributed Control 304
Writing a Security Policy 306
Passwords 307
Choosing a Password 309
Password Software 310
Other Precautions 313
Check Application Security 313
Remove Unnecessary Secure Terminals 314
Remove Unnecessary Software 314
Keep Software Updated 315
Security Monitoring 316
Know Your System 316
Looking for Trouble 317
COPS 321
Limiting Access 322
Encryption 322
Firewalls 325
Routing Control 329
Access Control 330
wrapper 331
Words to the Wise 334

13: Internet Information Resources 33 7


Anonymous ftp 338
Creating an ftp Server 339
Retrieving RFCs 341
Retrieving RFCs by Mail 343
Mailing Lists 344
Resource Discovery Programs 345
archie 346
gopher 348
The White Pages 352
X.500 356
More Reading 357

A: Network Contacts 359


Internet Contacts 360

B: Forms, Forms, Forms 363


Whois Registration 365
Network Number Request 368
Internet Domain Name Registration 370
IN-ADDR.ARPA Registration 373
Autonomous System Number Application 374

x
C: A gated Reference 3 79
The gated Command 379
Signal Processing 382
The gated Configuration Language 383
Directive Statements 384
Trace Statements 385
Definition Statements 386
Protocol Statements 389
The rip Statement 390
The hello Statement 391
The redirect Statement 392
The egp Statement 392
The bgp Statement 396
Static Statements 397
Control Statements 398
The accept Statement 398
The propagate Statement 400
Preference Precedence 403

D: named Reference 405


The named Command 405
Signal Processing 406
named.boot Configuration Commands 407
Zone File Records 409
Standard Resource Records 410
Experimental Resource Record 424

E: Sample sendmailcf 427


Thesendmail Configuration File 428

F: Selected TCP/IP Headers 439


IP Datagram Header 440
TCP Segment Header 442
ICMP Parameter Problem Message Header 444

G: Reference for passwd+ 445


The Configuration File 445
The GECOS Data 446
Logging passwd+ Activity 448
Password Tests , 449

XI
O'Reilly & Associates, Inc.

TCP/IP Network Administration


The TCP/IP protocols (also called the "Internet protocols") are the "glue"
that connects most UNIX networks (LANs). They're also responsible for the
international "Internet": the world-wide network of networks that lets you
send electronic mail from Maryland to Perth, Australia in a matter of
minutes. Originally developed to support research on the ARPANET, the
TCP/IP protocols have grown to maturity and widespread acceptance with
UNIX.
TCP/IP Network Administration belongs on every system administrator's
desk. It describes how to set up and administer a network of UNIX
systems using the TCP/IP protocols. We take a practical approach: how to
put your systems on the net (whether that means a LAN or the world-wide
Internet) and keep them running. Even if your system isn't on a network
now, it should be—and, within a year or two, it probably will be.
Topics covered include:
• Basic concepts: what the protocols are, addressing, name service
• Getting connected: the paperwork needed for connection to the
Internet
• Basic system setup and configuration
• The "serial line" protocols, SLIP and PPP
• Routing, including the gated super-daemon
• Name service, including DNS/BIND
• Common network applications: the r utilities, and basic NFS and NIS
• sendmail configuration
• Setting up an anonymous FTP server
• Troubleshooting and security

RepKover.
US $29.95
ISBN 0 - 9 3 7 1 7 5 - 8 2 - X CAN $42.95
llh.ll llllllllllilllllll.il 90000>

Printed on Recycled Paper


9 "780937"175828'
ISBN 0-937175-82-X

You might also like