networking l.
Skip this Video
Loading SlideShow in 5 Seconds..
Networking PowerPoint Presentation
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 34

Networking - PowerPoint PPT Presentation

  • Uploaded on

Networking. 12.1 Introduction VxWorks Network Configuration Routing Protocols Remote Access Services. Network Protocols. Machines on a network must agree to exchange data in some standard way. Internet protocol suite (also called TCP/IP) provides system independent protocols.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Networking' - audi

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

12.1 Introduction

VxWorks Network Configuration

Routing Protocols

Remote Access Services

network protocols
Network Protocols
  • Machines on a network must agree to exchange data in some standard way.
  • Internet protocol suite (also called TCP/IP) provides system independent protocols.
  • VxWorks provides an implementation of TCP/IP protocol suite based on the 4.4BSD release
  • Features include:
    • Increased configurability and scalability
    • MUX layer
    • Support for contemporary Internet features
network scalability
Network Scalability
  • Selective inclusion of core TCP/IP networking protocols is provided.
  • TCP/IP parameters can be set by setting properties of individual components. Examples: TCP Connection Timeout, IP Time-to-Live value, TCP/UDP receive and send buffer sizes, and tuning of internal buffers. (See VxWorks Network Programmer’s Guide.)
network services
Network Services
  • VxWorks network services include:
    • Simple Network Time Protocol (SNTP)
    • DNS resolver
    • Dynamic Routing (RIPv1/RIPv2/OSPF)
    • rlogin/telnet
    • Remote command execution
    • Remote file access
    • Multicasting, including IGMP
  • User can build other network services as needed.


12.2 VxWorks Network Configuration

Routing Protocols

Remote Access Services

host names
Host Names
  • To associate a name with an internet address:

hostAdd (hostName, hostAddr)

  • To display host name table use:

hostShow ()

  • The name of the boot host is automatically added to the table from the boot parameters.
domain name system
Domain Name System
  • Domain Name System (DNS) is a distributed client/server application supporting host names being stored in a distributed database.
  • DNS requires a name server and, on the client side, a resolver. VxWorks supports resolver functionality in resolvLib.
  • resolvLib includes the following routines:
    • resolvGetHostByName() -- send a DNS query to the name server for the IP address of a host.
    • resolvGetHostByAddr() -- send a DNS query to the name server for the host name of an IP address.
dns resolver configuration
DNS Resolver Configuration
  • The DNS resolver component (/network components/networking applications/DNS resolver) must be added to VxWorks.
  • The resolver must be initialized before use. Required information includes RESOLVER_DOMAIN and RESOLVER_DOMAIN_SERVER. This can be done through the project facility or by calling resolvInit().
dhcp basics
DHCP Basics
  • Dynamic Host Configuration Protocol (DHCP) allows a host to acquire an IP address, and possibly boot parameters, from a remote host.
  • A DHCP client can obtain a temporary lease of an IP address from a DHCP server, which maintains a database of available addresses and other parameters. A DHCP relay agent is necessary to support DHCP operation across subnet boundaries.


VxWorks Network Configuration

12.3 Routing Protocols

Remote Access Services

routing overview
Routing Overview
  • Internet Protocol (IP) routing algorithm:
  • The target routing table can be built in two ways:
    • Statically, by adding routes to a local routing table using mRouteAdd() orrouteAdd( ).
    • Or dynamically, where hosts exchange routing information using a routing protocol.
  • VxWorks supports two routing protocols: Routing Information Protocol (RIP) and Open Shortest Path First (OSPF).

if (destination on a directly attached network)

send data to destination


use routing table to find correct router

send data to router

adding static routes in vxworks
Adding Static Routes in VxWorks
  • To add multiple routes to the same location, use

mRouteAdd (dest, gateway, mask, tos, flags)

Can use a destination/gateway internet address in dot notation. Specify destination subnet mask and IP type-of-service. See routeLib help page for details.

  • To add a route to the /24 network through the router gatehost:

mRouteAdd (“”, “gatehost”, 0xffffff00, 0, 0)

  • Routing table show routines, mRouteShow() or routeShow() require the component /network components/networking protocols/network debugging/ Network show routines.
network show routines
Network Show Routines
  • Are used to display network statistics and debugging information. Configuration information and statistics can be shown for protocols (IP, ICMP, TCP, etc.) , buffering, network interfaces, etc.
  • Example (ARP table entries):



destination gateway flags Refcnt Use Interface

-------------------------------------------------------------------------- 08:00:20:7b:06:fb 405 0 45 ei0 00:60:97:4f:d5:16 405 0 0 ei0


value = 75 = 0x4b = ‘K’

dynamic routing overview
Dynamic Routing Overview
  • Dynamic routing protocols allow hosts (typically routers) to exchange routing information. Advantages over statically created routing tables include:
    • Faster update as link states change
    • Ability to calculate the most efficient route if there are multiple routes to a destination
    • Easier maintenance
  • These protocols do not affect the Internet routing algorithm, but instead impose a routing policy when constructing the routing table.
  • VxWorks supports RIP versions 1 and 2 and OSPF (an optional component).
routing internet protocol
Routing Internet Protocol
  • RIP uses UDP to exchange routing information.
  • RIP is a distance vector protocol -- each route includes a number of hop counts. If multiple paths to a destination exist, RIP chooses the most efficient route by minimizing this count.
  • RIPv2 updates RIPv1 by including:
    • support for classless addressing
    • ability to use multicasting and broadcasting
    • support for authentication
  • use ping( ) for testing routes
  • See ripLib in the VxWorks Reference Manual for details.


VxWorks Network Configuration

Routing Protocols

12.4 Remote Access Services

remote login and telnet
Remote Login and Telnet
  • rlogin and telnet offer an alternative to cross-development using the Tornado target server.
nfs server overview
NFS Server Overview
  • Allows remote hosts to access a target’s DOS file systems using NFS protocol.
  • By default no authentication is performed.
  • Add the component /network components/networking protocols/network filesystems/NFS server.
  • NFS server configuration supports:

1. Create a mountable DOS file system:

dosFsDevInitOptionsSet (DOS_OPT_EXPORT);

2. Export DOS file system:

nfsExport (name, fsId, rdOnly, notUsed);

3. Mount file system on remote host.

vxworks ftp server
VxWorks FTP Server
  • The FTP server component is included by configuring /network components/networking protocols/network filesystems/FTP server.
  • When target is booted, should see tFtpdTask (server daemon) running.
  • FTP security, which will require a valid user name and password from clients, can be included by configuring /network components/networking protocols/network filesystems/FTP server security.
  • The RLOGIN/TELNET password protection component allows a single user name and encrypted password. Additional users can be added by calling loginUserAdd() in application initialization code.
nfs vs ftp server
NFS vs. FTP Server
  • NFS Advantages:
    • Efficient file access.
    • Configurable number of servers pre-spawned.
  • FTP Advantages:
    • Can access file systems other than DOS.
    • All network hosts have FTP client.
nfs client service
NFS Client Service
  • Network File System (NFS) was developed by Sun Microsystems.
  • Allows efficient access to files. NFS transfers and buffers files in pieces (usually 8 Kbytes).
  • Remote file systems are mounted, then accessed as if they were local file systems.
  • VxWorks provides NFS client and server.
  • The NFS client component can be found under /network components/networking protocols/network filesystems/NFS client.
nfs client configuration
NFS Client Configuration
  • To access files on a remote machine using NFS:

0. Export server’s file system:

Makes the local file system available to remote host with appropriate access permissions

1. Mount the file system on the client.

nfsMount (host, fileSystem, localName)

2. Set the client’s authentication parameters:

nfsAuthUnixSet (hostName, uid, gid, ngids,aup_gids)

Defaults (NFS_GROUP_ID = 100 and NFS_USER_ID = 2001) will need to be changed. UNIX users can get the required values using:

% id

uid=219(marc) gid=700(training)

netdrv file access clients
netDrv File Access Clients
  • netDrv allows access to remote files:
    • Entire file read into target memory on open( ).
    • read( )/write( ) act on copy of file in memory.
    • File not written to remote host until close( ).
  • Can’t access large files (constrained by available memory).
  • ioctl (fd, FIOSYNC, 0) is not supported.
  • dirLib routines opendir / readdir do not work on netDrv directories. stat / fstat are only partially implemented.
creating network devices
Creating network Devices

STATUS netDevCreate (devName, host, protocol)

devName Local name of device to create. By convention, ends with ‘:’.

host Name of remote machine (from previous hostAdd( )).

protocol Protocol to transfer files to/from VxWorks (0=RSH or 1=FTP).

  • Example

-> netDevCreate (“ohio:”, “ohio”, 1)

-> fd = open (“ohio:/u/teamN”, 2)

executing remote commands
Executing Remote Commands
  • VxWorks programs can invoke remote shell (RSH) commands on a UNIX host.
  • A file descriptor called a socket is created. Can read( ) from this socket to get command output.
unix remote command execution
UNIX: Remote Command Execution

int rcmd (host, remotePort, localUser, remoteUser, cmd, pFd2)

host Host name or inet number.

remotePort Remote port number to connect to, typically 514 (RSH server).

localUser Name of local user.

remoteUser User name on remote host.

cmd Shell command string to execute.

pFd2 If non-zero, a socket for stderr is foreach I (*.o)returned through this pointer.

  • Returns a socket file descriptor or ERROR.
netdrv client services comparison
netDrv Client Services Comparison
  • Advantages of FTP over RSH:
    • FTP is part of the TCP/IP protocol suite, so it is available on all networked hosts.
    • FTP is faster on open/close, since there is no shell delay.
    • FTP server is supplied with VxWorks.
  • Advantages of RSH over FTP:
    • FTP clear text password goes over the network on each open( ) and close( ).
netdrv vs nfsdrv
netDrv vs. nfsDrv
  • Advantages of nfsDrv over netDrv:
    • Reads and writes only needed parts of the file.
    • Can access arbitrarily large files.
    • open( )/close( ) much faster.
    • Can use dirLib routines.
    • Can flush file changes with FIOSYNC.
  • Advantages of netDrv over nfsDrv:
    • All networked hosts have an FTP server.
    • Easier to configure.
    • read( )/write( ) slightly faster.
  • Internet Protocol for node-to-node routing.
  • MUX layer decouples link-layer driver and network protocol.
  • Configuring the network
    • Configure host name table using hostAdd() or use DNS resolver.
    • Configure host’s routing table using mRouteAdd() or use RIP/OSPF.
  • Show routines are available to troubleshoot network configuration.
  • DHCP allows a host to obtain IP address leases and boot parameters from a remote server.
  • DHCP components:
    • DHCP Server
    • DHCP Relay Agent
    • DHCP Client
  • rlogin (UNIXHost) and telnet support.
  • FTP and NFS servers allows local VxWorks files to be accessed by a remote machine.
  • nfsDrv mounts remote file systems with nfsMount( )
    • Reads and writes portion of remote file.
    • File system must be exported by remote host.
  • netDrv devices created with netDevCreate( ).
    • Entire file is read into VxWorks on open( ), and not updated until close( ).
    • Uses either RSH (UNIX Host) or FTP for file transfer.
    • RSH requires name and entry in .rhosts. (UNIX Host)
    • FTP requires name and password.
  • rcmd( ) and rlogin() (UNIX Host)