易截截图软件、单文件、免安装、纯绿色、仅160KB

linux添加路由

linux添加路由
http://baikgd.blog.163.com/blog/static/35402495200972111353827/
服务器ip(eth0)
[root@localhost net]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:E3:9A:15
inet addr:172.18.3.205 Bcast:172.18.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fee3:9a15/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4776 errors:0 dropped:0 overruns:0 frame:0
TX packets:3348 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:439384 (429.0 KiB) TX bytes:390425 (381.2 KiB)
Interrupt:11 Base address:0x1400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:254 errors:0 dropped:0 overruns:0 frame:0
TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22128 (21.6 KiB) TX bytes:22128 (21.6 KiB)
查看原始路由信息
[root@localhost net]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.18.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
==========================================================
添加默认网关
[root@localhost net]# route add default gw 172.18.3.50
[root@localhost net]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.18.3.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 172.18.3.50 0.0.0.0 UG 0 0 0 eth0
=======================================================
添加一个ip(eth0:1)
[root@localhost net]# ifconfig eth0:1 192.168.168.119 netmask 255.255.255.0 up
[root@localhost net]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:E3:9A:15
inet addr:172.18.3.205 Bcast:172.18.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fee3:9a15/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5071 errors:0 dropped:0 overruns:0 frame:0
TX packets:3569 errors:0 dropped:0 overrun


相关文档:

实战Linux Bluetooth编程(三) HCI层编程

1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI)  就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......

实战Linux Bluetooth编程(六) L2CAP编程实例

例一:发送Signaling Packet:
Signaling Command是2个Bluetooth实体之间的L2CAP层命令传输。所以得Signaling Command使用CID 0x0001.
多个Command可以在一个C-frame(control frame)中发送。
 如果要直接发送Signaling Command.需要建立SOCK_RAW类型的L2CAP连接Socket。这样才有机会自己填充Command Code,Identi ......

linux的文件系统认识(1)

1.谈到linux的文件系统,我们必须关注/etc/fstab文件的内容;在linux中的所有挂载分区和设备都在fstab表格中。
/etc/fstab表格中的选择项参数定义如下:
ro or rw
Read only or read write
noauto
Do not respond to mount -a. Used for external devices CDROMs ...
noexec
Executables cannot be started from the ......

Linux笔记


linux目录架构
/   根目录
/bin    常用的命令
binary file 的目錄
/boot   存放系统启动时必须读取的档案,包括核心
(kernel) 在内
     /boot/grub/menu.lst   GRUB设置
     /boot/vmlinuz   内核
  ......

linux的文件系统认识(2)

如果你正在为linux分区空间不足而苦恼时,请你一定要往下看。
linux LVM(logical volumes management),这个时linux中的逻辑卷管理软件,可以在开机情况下重新划分分区大小。
LVM允许一组不同的块设备(硬盘,分区,磁盘阵列...)组合到一起成为一个大存储设备,这就是卷组(volume group)。
下面我们来开始建立一个卷组 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号