千兆以太网物理层 8B1Q4/4D-PAM5

本文详细介绍了千兆以太网(1000BASE-T)的物理层编码技术,包括8B1Q4和4D-PAM5。8B1Q4将8比特数据转化为4个五进制符号,随后通过4D-PAM5将每个符号编码为5个电压等级的信号,实现每个线对250Mbps的数据传输率,总速率达到1000Mbps。此外,文章还探讨了编码方法的复杂性和1000BASE-T标准对信号平衡的要求。
摘要由CSDN通过智能技术生成

1. Encoding on 1000Mbps Gigabit Ethernet

For copper cable based Gigabit Ethernet (1000BASE-T), a pair of encoding methods was chosen, 8B1Q4 and 4D-PAM5. For fiber optic based Gigabit Ethernet (1000BASE-X), a different pair of encoding methods was chosen, 8B10B and NRZ.

 

~~ 8B1Q4 and 4D-PAM5 Encoding 0n 1000BASE-T~~

Gigabit 1000BASE-T Ethernet was designed to operate in full-duplex mode at a speed of 1000Mbps. To achieve this, all four wire pairs must be used simultaneously in parallel when transmitting or receiving. Wire pairs are no longer separated into a pair for transmitting and a pair for receiving - like on Fast Ethernet. Any wire pair can be used for transmitting or receiving - sending and receiving at the same time if necessary.

if [ -f "/etc/pam.d/system-auth" ];then if grep -q "password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1" /etc/pam.d/system-auth then sed -i '/password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1/s/^#//' /etc/pam.d/system-auth else echo 'password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1' >> /etc/pam.d/system-auth fi if grep -q "password required pam_unix.so remember=5 use_authtok md5 shadow" /etc/pam.d/system-auth then sed -i '/password required pam_unix.so remember=5 use_authtok md5 shadow/s/^#//' /etc/pam.d/system-auth else echo 'password required pam_unix.so remember=5 use_authtok md5 shadow' >> /etc/pam.d/system-auth fi fi if [ -f "/etc/pam.d/password-auth-ac" ];then if grep -q "password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1" /etc/pam.d/password-auth-ac then sed -i '/password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1/s/^#//' /etc/pam.d/password-auth-ac else echo 'password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1' >> /etc/pam.d/password-auth-ac fi if grep -q "password required pam_unix.so remember=5 use_authtok md5 shadow" /etc/pam.d/password-auth-ac then sed -i '/password required pam_unix.so remember=5 use_authtok md5 shadow/s/^#//' /etc/pam.d/password-auth-ac else echo 'password required pam_unix.so remember=5 use_authtok md5 shadow' >> /etc/pam.d/password-auth-ac fi fi
07-14
以下是将这些命令转换为Python代码的示例: ```python import subprocess system_auth_file = '/etc/pam.d/system-auth' password_auth_ac_file = '/etc/pam.d/password-auth-ac' # Update system-auth file if subprocess.call('[ -f "/etc/pam.d/system-auth" ]', shell=True) == 0: if subprocess.call('grep -q "password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1" /etc/pam.d/system-auth', shell=True) == 0: subprocess.call("sed -i '/password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1/s/^#//' /etc/pam.d/system-auth", shell=True) else: subprocess.call("echo 'password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1' >> /etc/pam.d/system-auth", shell=True) if subprocess.call('grep -q "password required pam_unix.so remember=5 use_authtok md5 shadow" /etc/pam.d/system-auth', shell=True) == 0: subprocess.call("sed -i '/password required pam_unix.so remember=5 use_authtok md5 shadow/s/^#//' /etc/pam.d/system-auth", shell=True) else: subprocess.call("echo 'password required pam_unix.so remember=5 use_authtok md5 shadow' >> /etc/pam.d/system-auth", shell=True) # Update password-auth-ac file if subprocess.call('[ -f "/etc/pam.d/password-auth-ac" ]', shell=True) == 0: if subprocess.call('grep -q "password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1" /etc/pam.d/password-auth-ac', shell=True) == 0: subprocess.call("sed -i '/password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1/s/^#//' /etc/pam.d/password-auth-ac", shell=True) else: subprocess.call("echo 'password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1' >> /etc/pam.d/password-auth-ac", shell=True) if subprocess.call('grep -q "password required pam_unix.so remember=5 use_authtok md5 shadow" /etc/pam.d/password-auth-ac', shell=True) == 0: subprocess.call("sed -i '/password required pam_unix.so remember=5 use_authtok md5 shadow/s/^#//' /etc/pam.d/password-auth-ac", shell=True) else: subprocess.call("echo 'password required pam_unix.so remember=5 use_authtok md5 shadow' >> /etc/pam.d/password-auth-ac", shell=True) ``` 上面的代码首先检查是否存在`/etc/pam.d/system-auth`文件,如果存在则更新该文件。如果文件中存在`password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1`行,则将其注释去除,否则将该行添加到文件末尾。接着,检查文件中是否存在`password required pam_unix.so remember=5 use_authtok md5 shadow`行,如果不存在则添加该行到文件末尾。 然后,检查是否存在`/etc/pam.d/password-auth-ac`文件,如果存在则更新该文件。如果文件中存在`password requisite pam_cracklib.so retry=3 minlen=8 minclass=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1`行,则将其注释去除,否则将该行添加到文件末尾。接着,检查文件中是否存在`password required pam_unix.so remember=5 use_authtok md5 shadow`行,如果不存在则添加该行到文件末尾。 请确保你具有足够的权限来执行这些操作,并将需要修改的文件路径正确添加到`system_auth_file`和`password_auth_ac_file`变量中。运行代码后,命令将被执行。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hello_courage

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值