Moxa Technologies UC-7420/7410 user manual How to check the connection, UP Loopback Running

Page 65

UC-7420/7410 User’s Manual

Managing Communication

How to check the connection

Once you’ve set up a PPP connection, there are some steps you can take to test the connection. First, type:

/sbin/ifconfig

(The folder ifconfig may be located elsewhere, depending on your distribution.) You should be able to see all the network interfaces that are UP. ppp0 should be one of them, and you should recognize the first IP address as your own, and the “P-t-P address” (or point-to-point address) the address of your server. Here’s what it looks like on one machine:

lo

Link encap Local Loopback

 

 

 

inet addr 127.0.0.1 Bcast 127.255.255.255

Mask 255.0.0.0

 

UP LOOPBACK RUNNING

MTU 2000

Metric 1

 

RX packets 0 errors 0 dropped 0 overrun 0

 

ppp0

Link encap Point-to-Point Protocol

 

 

inet addr 192.76.32.3 P-t-P 129.67.1.165

Mask 255.255.255.0

 

UP POINTOPOINT RUNNING

MTU 1500

Metric 1

RX packets 33 errors 0 dropped 0 overrun 0

TX packets 42 errors 0 dropped 0 overrun 0

Now, type:

ping z.z.z.z

where z.z.z.z is the address of your name server. This should work. Here’s what the response could look like:

waddington:~$p ping 129.67.1.165

PING 129.67.1.165 (129.67.1.165): 56 data bytes

64 bytes from 129.67.1.165: icmp_seq=0 ttl=225 time=268 ms

64 bytes from 129.67.1.165: icmp_seq=1 ttl=225 time=247 ms

64 bytes from 129.67.1.165: icmp_seq=2 ttl=225 time=266 ms ^C

--- 129.67.1.165 ping statistics ---

3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 247/260/268 ms waddington:~$

Try typing:

netstat -nr

This should show three routes, something like this:

 

 

 

 

Kernel routing table

 

 

 

 

 

Destination

Gateway

Genmask

Flags

Metric

Ref

Use

iface

 

 

 

 

 

 

129.67.1.165

0.0.0.0

255.255.255.255

UH

0

0

6

ppp0

 

 

 

 

 

 

127.0.0.0

0.0.0.0

255.0.0.0

U

0

0

0 lo

0.0.0.0

129.67.1.165

0.0.0.0

UG

0

0

6298

ppp0

 

 

 

 

 

 

If your output looks similar but doesn’t have the destination 0.0.0.0 line (which refers to the default route used for connections), you may have run pppd without the ‘defaultroute’ option. At this point you can try using Telnet, ftp, or finger, bearing in mind that you’ll have to use numeric IP addresses unless you’ve set up /etc/resolv.conf correctly.

4-13

Image 65
Contents Third Edition, June UC-7420/7410 User’s ManualDisclaimer Copyright NoticeTrademarks Table of Contents Chapter UC Finder Appendix B Windows Tool Chain Introduction ‰ Hardware Introduction IntroductionProduct Features Package ChecklistOverview UC-7410-LXProduct Hardware Specifications Appearance Appearance and DimensionsHardware Introduction Dimensions LED Name Color Meaning Hardware Block DiagramLED Indicators Reset Button Reset-type ButtonsReset to default Button Real Time ClockWall or Cabinet Placement OptionsDIN-Rail Mounting Wiring RequirementsHardware Connection Description Connecting to the Network Connecting the PowerPin Signal Grounding UC-7420/7410Connecting to the Console Port Connecting to a Serial DeviceCompactFlash Pin RS-232 RS-422 RS-485Software Architecture Software IntroductionSoftware Package Journaling Flash File System JFFS2Software Version Comparison Table Directory Change Protocol stacks and utilitiesGetting Started ‰ Configuring the Ethernet InterfaceSerial Console Powering on UC-7420/7410Connecting UC-7420/7410 to a PC Telnet Console Default IP Address Netmask192.168.3.127 255.255.255.0 192.168.4.127 255.255.255.0Windows Users SSH ConsoleModifying Network Settings with the Serial Console Configuring the Ethernet InterfaceLinux Users Static IP addressesDynamic IP addresses Modifying Network Settings over the Network Configuring the Wlan via the Pcmcia InterfaceDefault IP address is 192.168.5.127, netmask IEEE802.11b#vi /etc/wlan/wlancfg-any IEEE802.11g Setting Setting ExplanationKey1Str, Key2Str, Key3Str, Key4Str-Sets strings Key1 to Key4 TurboRate-Enables or disables TurboRate Test Program-Developing Hello.c Installing the Tool Chain LinuxChecking the Flash Memory Space StepYou should receive the following response Compiling Hello.cUploading Hello to UC-7420/7410 and Running the Program Testing EnvironmentDeveloping Your First Application #mount -t iso9660 /dev/cdrom /mnt/cdrom Compiling tcps2.cPuTTY Uploading tcps2-release and Running the Program#jobs // use this command to check if the program is running UC-7420/7410 User’s Manual Testing Procedure SummaryUC-7420/7410 User’s Manual Managing Embedded Linux ‰ System Version Information ‰ System Image BackupSystem Version Information System Image BackupUpgrading the Firmware Upgrading the firmware will erase all data on the Flash ROM#upramdisk #cd /mnt/ramdisk Loading Factory Defaults Firmware version V1.5 and later versions Backing Up the User File SystemFirmware versions earlier than V1.5 not including Enabling and Disabling Daemons UC-7420/7410 User’s Manual Managing Embedded Linux Setting the Run-Level Setting the Time Manually Adjusting the System TimeUpdating the Time Automatically Example shell script to update the system time periodicallyNTP Client Change mode of fixtime.sh Cron-daemon to Execute Scheduled CommandsEnable the cron daemon manually Enable cron when the system boots upCF Mass Storage Connecting PeripheralsUSB Mass Storage ‰ Iptables ‰ NAT Managing CommunicationsTelnet / FTP Web Service-ApacheEnabling the Telnet/ftp server Disabling the Telnet/ftp serverUsr/www/cgi-bin Saving a Web Page to the CF Card Use the following commands to restart the Apache web server Iptables Local Host Packets Define policy for chain rules Observe and erase chain rulesUsage ExamplesIptmac Append or delete rulesNAT Example Enabling NAT at BootupDial-up Service-PPP Example 2 Connecting to a PPP server over a hard-wired link UP Loopback Running How to check the connectionSetting up a Machine for Incoming PPP Connections Setting up UC-7420/7410 as an NFS ServerNFS Network File System #vi /etc/exportsSetting up UC-7420/7410 as an NFS Client Steps 2 MailOpen VPN Internet IFS=‘ Create link symbols to enable this script at boot time Destination Gateway Genmsk Flags Metric Use Iface Now ping Host B from Host a by typing Setup 3 Routed IP Destination Gateway Genmsk Flags Metric Use Iface Programmer’s Guide Linux Tool Chain Introduction Address Size ContentsFlash Memory Map Obtaining help Debugging with GDBCross Compiling Applications and Libraries Tools Available in the Host EnvironmentBuzzer Device APIRTC Real Time Clock WDT Watch Dog Timer Input Int fd File handle from swtdopen return value Output User application example Example Special NoteSwtddisableswtdfd Int mainint argc, char *argv Pidt sonpid Example to get the baud rate Example to set the baud rateBaud rate inaccuracy KeyPadSpecial Note ExamplesMake File Example UC Finder Windows UC Finder Installing the SoftwareUC-7420/7410 User’s Manual UC Finder Broadcast Search Linux ucfinder Busybox V0.60.4 Linux normal command utility collection System CommandsFile manager EditorMoxa special utilities ProcessOther Windows Tool Chain Introduction Introduction Select the Root Directory Installation ProcedureUC-7420/7410 User’s Manual Windows Tool Chain Introduction UC-7420/7410 User’s Manual Windows Tool Chain Introduction Using the Bash Shell UC-7420/7410 User’s Manual Windows Tool Chain Introduction GDB debug tool-InsightUC-7420/7410 User’s Manual Windows Tool Chain Introduction Service Information Following services are provided Moxa Internet ServicesMoxa Product † UC-7410-LX † UC-7420-LX Serial Number Problem Report FormProduct Return Procedure