ip-up脚本参数
#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd
# Only the link to Newman requires this handling.
#
# When the ppp link comes up, this script is called with the following
# parameters
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the tty device name
# $3 the tty device speed
# $4 the local IP address for the interface
# $5 the remote IP address
# $6 the parameter specified by the 'ipparam' option to pppd
#
SCRIPTS
Pppd invokes scripts at various stages in its processing which can be
used to perform site-specific ancillary processing. These scripts are
usually shell scripts, but could be executable code files instead.
Pppd does not wait for the scripts to finish. The scripts are exe-
cuted as root (with the real and effective user-id set to 0), so that
they can do things such as update routing tables or run privileged
daemons. Be careful that the contents of these scripts do not compro-
mise your system’s security. Pppd runs the scripts with standard
input, output and error redirected to /dev/null, and with an environ-
ment that is empty except for some environment variables that give
information about the link. The environment variables that pppd sets
are:
DEVICE The name of the serial tty device being used.
IFNAME The name of the network interface being used.
IPLOCAL
The IP address for the local end of the link. This is only set
when IPCP has come up.
IPREMOTE
The IP address for the remote end of the link. This is only
set when IPCP has come up.
PEERNAME
The authenticated name of the peer. This is only set if the
peer authenticates itself.
SPEED The baud rate of the tty device.
ORIG_UID
The real user-id of the user who invoked pppd.
PPPLOGNAME
The username of the real user-id that invoked pppd. This is
always set.
For the ip-down and auth-down scripts, pppd also sets the following
variables giving statistics for the connection:
CONNECT_TIME
The number of seconds from when the PPP negotiation started
until the connection was terminated.
BYTES_SENT
The number of bytes sent (at the level of the serial port) dur-
ing the connection.
BYTES_RCVD
The number of bytes received (at the level of the serial port)
during the connection.
LINKNAME
The logical name of the link, set with the linkname option.
DNS1 If the peer supplies DNS server addresses, this variable is set
to the first DNS server address supplied.
DNS2 If the peer supplies DNS server addresses, this variable is set
to the second DNS server address supplied.
Pppd invokes the following scripts, if they exist. It is not an error
if they don’t exist.
ip-up脚本参数的更多相关文章
- python注释、脚本参数、字节码
python注释.脚本参数.字节码 --道心 python安装 1.下载安装包 https://www.python.org/downloads/ 2.安装 默认安装路径:C:\python27 3. ...
- linux下TCP/IP及内核参数优化调优(转)
Linux下TCP/IP及内核参数优化有多种方式,参数配置得当可以大大提高系统的性能,也可以根据特定场景进行专门的优化,如TIME_WAIT过高,DDOS攻击等等. 如下配置是写在sysctl.con ...
- Linux内核 TCP/IP、Socket参数调优
Linux内核 TCP/IP.Socket参数调优 2014-06-06 Harrison.... 阅 9611 转 165 转藏到我的图书馆 微信分享: Doc1: /proc/sy ...
- jquery 、 JS 脚本参数的认识与使用
jquery . JS 脚本参数的认识与使用 如何使用jquery刷新当前页面 下面介绍全页面刷新方法:有时候可能会用到 window.location.reload(); //刷新当前页面. par ...
- 对于shell脚本参数获取时的一点小技巧
问题如下: 根据脚本参数的个数$#进行一个循环,在依次输出每个参数$1 $2 $3...... 我有一个循环变量i $i 取到这时的i为1,我想使用这个1再去调用$1,也是就是打印出第一个参数 就是$ ...
- TCP/IP及内核参数优化调优
Linux下TCP/IP及内核参数优化有多种方式,参数配置得当可以大大提高系统的性能,也可以根据特定场景进行专门的优化,如TIME_WAIT过高,DDOS攻击等等.如下配置是写在sysctl.conf ...
- Linux下批量ping某个网段ip的脚本
比如现在需要对172.16.50.0/24网段的ip进行检查,检查哪些ip现在被占用,哪些ip没有被占用,可以通过ping命令来检查,脚本如下: [root@uatdns01 opt]# vim /o ...
- shell脚本参数中有空格
shell脚本参数中有空格 在shell脚本中如果有空格的处理如下: sh test.sh "hello word" echo $1 得到的是hello,而不是hello word ...
- Linux TCP/IP调优参数 /proc/sys/net/目录
所有的TCP/IP调优参数都位于/proc/sys/net/目录. 例如, 下面是最重要的一些调优参数,后面是它们的含义: /proc/sys/net/core/rmem_default " ...
- 写了个爬虫代理ip的脚本给大家使用
写了个爬虫代理ip的脚本给大家使用 一.代码 import requests from lxml.html import etree url = 'http://www.kuaidaili.com/f ...
随机推荐
- equal 与 hashCode
equal Object: public static boolean equals(Object a, Object b) { return (a == b) || (a != null & ...
- R语言 循环
R语言循环 可能有一种情况,当你需要执行一段代码几次. 通常,顺序执行语句. 首先执行函数中的第一个语句,然后执行第二个语句,依此类推. 编程语言提供允许更复杂的执行路径的各种控制结构. 循环语句允许 ...
- 阿里云宣布 Serverless 容器服务 弹性容器实例 ECI 正式商业化
摘要: 阿里云宣布弹性容器实例 ECI(Elastic Container Instance)正式商业化,ECI 是阿里云践行普惠的云计算理念,将 Serverless 和 Container 技术结 ...
- LUOGU P1402 酒店之王 (网络流)
解题思路 应该比较显然得能看出这是个网络流,将$S$与房间连边,房间与人连边,人与菜连边,菜与汇点连边,边的流量均为1.但这样是错误的,因为有可能一个人跑过去2的流量,所以要将人拆点限流. #incl ...
- 驱动层hook系统函数的时,如何屏蔽掉只读属性?
对于Intel 80486或以上的CPU,CR0的位16是写保护(Write Proctect)标志.当设置该标志时,处理器会禁止超级用户程序(例如特权级0的程序)向只读页面执行写操作:当该位复位时则 ...
- VS2010-MFC(对话框:字体对话框)
转自:http://www.jizhuomi.com/software/175.html 字体对话框的作用是用来选择字体.我们也经常能够见到.MFC使用CFontDialog类封装了字体对话框的所有操 ...
- (4)mysql约束
完整性约束 1.设置非空约束 not null 简称 NK约束 创建表时设置非空 CREATE TABLE tb_meng2(id INT NOT NULL,age INT); 2.设置字段默认值 默 ...
- (转)Python成长之路【第九篇】:Python基础之面向对象
一.三大编程范式 正本清源一:有人说,函数式编程就是用函数编程-->错误1 编程范式即编程的方法论,标识一种编程风格 大家学习了基本的Python语法后,大家就可以写Python代码了,然后每个 ...
- day 84 Vue学习之vue-cli脚手架下载安装及配置
Vue学习之vue-cli脚手架下载安装及配置 1. 先下载node.js,下载地址:https://nodejs.org/en/download/ 找个目录保存,解压下载的文件,然后配置环境变量 ...
- ims注册与注销
ims注册流程: 步骤1:当IMS和SIM访问已经就绪时,IMC将在满足条件后触发IMS注册到IMCB.步骤2.3:IMCB请求IMSA/IMSM获取IMS PDN和P-CSCF,然后触发VoLTE ...